Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup.py install is deprecated #1016

Open
juju4 opened this issue Oct 30, 2022 · 3 comments
Open

setup.py install is deprecated #1016

juju4 opened this issue Oct 30, 2022 · 3 comments
Labels
discussion long-term-improvement A better way of doing things WIP work in progress

Comments

@juju4
Copy link
Contributor

juju4 commented Oct 30, 2022

Bug Template

Title: setup.py install is deprecated

Description:

What issue is being seen? Describe what should be happening instead of the bug, for example: Cartography should not crash, the expected value isn't returned, the data schema is wrong, etc.

To Reproduce:

Steps to reproduce the behavior. Provide all data and inputs required to reproduce the issue.

$ dpkg -l python3 python3-setuptools
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name               Version        Architecture Description
+++-==================-==============-============-=========================================================================
ii  python3            3.10.6-1~22.04 amd64        interactive high-level object-oriented language (default python3 version)
ii  python3-setuptools 59.6.0-1.2     all          Python3 Distutils Enhancements
$ git clone https://github.com/lyft/cartography.git
Cloning into 'cartography'...
remote: Enumerating objects: 11267, done.
remote: Total 11267 (delta 0), reused 0 (delta 0), pack-reused 11267
Receiving objects: 100% (11267/11267), 5.89 MiB | 17.33 MiB/s, done.
Resolving deltas: 100% (8068/8068), done.
$ cd cartography/
$ python3 setup.py install
running install
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/lib/python3/dist-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release
  warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release
  warnings.warn(
running bdist_egg
running egg_info
creating cartography.egg-info
writing cartography.egg-info/PKG-INFO
writing dependency_links to cartography.egg-info/dependency_links.txt
writing entry points to cartography.egg-info/entry_points.txt
writing requirements to cartography.egg-info/requires.txt
[...]

Please complete the following information::

  • Cartography release version or commit hash: HEAD, 6e6e69d
  • Python version: 3.10.6
  • OS (feel free to omit this if you don't think it's relevant to your issue): Ubuntu 22.04 but likely applicable to others
@achantavy
Copy link
Contributor

Hey, I skimmed the docs you linked and I see that running python setup.py install is deprecated, but I don't see anything else. Given that our docs say to use pip install cartography (https://lyft.github.io/cartography/install.html#install--page-root), is there still an action that we need to take?

@achantavy achantavy added the needs-more-info This PR or issue needs more information label Nov 9, 2022
@juju4
Copy link
Contributor Author

juju4 commented Nov 13, 2022

I'm also new to this.
My understanding is that project should move to pyproject.toml + setup.cfg and at one point setup.py will be deprecated but no clear date.

other resources

Transitioning from setup.py to setup.cfg
To avoid executing arbitrary scripts and boilerplate code, we are transitioning into a full-fledged setup.cfg to declare your package information instead of running setup(). This inevitably brings challenges due to a different syntax. Here we provide a quick guide to understanding how setup.cfg is parsed by setuptools to ease the pain of transition.

@chandanchowdhury
Copy link
Collaborator

I will have PR to switch to pyproject.toml for build
chandanchowdhury/cartography@chandanchowdhury:cartography:master...development

Unfortunately, my development branch has unmerged commits for another PR, so don't want to send these yet just in case other PR do not get merged.

@chandanchowdhury chandanchowdhury added WIP work in progress discussion long-term-improvement A better way of doing things maintenance Care and feeding of this software project and removed needs-more-info This PR or issue needs more information maintenance Care and feeding of this software project labels Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion long-term-improvement A better way of doing things WIP work in progress
Projects
None yet
Development

No branches or pull requests

3 participants