-
Notifications
You must be signed in to change notification settings - Fork 9
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
Remove setuptools dependency #9
Conversation
Looks like this is not needed. This will allow to workaround some problems with build tools like this one python-poetry/poetry#4242
Mesco wrote at 2022-11-10 01:37 -0800:
Looks like this is not needed for a lib runtime, only for the installation.
Formerly (maybe this has changed with newer `zc.buildout` version),
`zc.buildout` issued a warning whenever a package part of a
namespace package (such as `zope`) did not list `setuptools`
as its `install` dependency.
This lets me add the `setuptools` dependency
in some of my packages even though it was not really necessary.
|
Hi @UncleGoogle, we require a signed contributor agreement for any code changes. Please see https://zope.dev/developer/becoming-a-committer.html. |
Pull Request Test Coverage Report for Build 3435619896
💛 - Coveralls |
I see. I've just checked with zc.buildout and don't see any warning, quite the opposite (see the last - 1 line). ~/R/u/zope.dottedname (patch-1) $ virtualenv .venv
created virtual environment CPython3.9.5.final.0-64 in 103ms
creator CPython3Posix(dest=/home/mieszko/Repos/uncleG/zope.dottedname/.venv, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/mieszko/.local/share/virtualenv)
added seed packages: pip==22.3, setuptools==65.5.0, wheel==0.37.1
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
~/R/u/zope.dottedname (patch-1) $ . .venv/bin/activate.fish
(.venv) ~/R/u/zope.dottedname (patch-1) $ pip uninstall setuptools # just to make sure
Found existing installation: setuptools 65.5.0
Uninstalling setuptools-65.5.0:
Would remove:
/home/mieszko/Repos/uncleG/zope.dottedname/.venv/lib/python3.9/site-packages/_distutils_hack/*
/home/mieszko/Repos/uncleG/zope.dottedname/.venv/lib/python3.9/site-packages/distutils-precedence.pth
/home/mieszko/Repos/uncleG/zope.dottedname/.venv/lib/python3.9/site-packages/pkg_resources/*
/home/mieszko/Repos/uncleG/zope.dottedname/.venv/lib/python3.9/site-packages/setuptools-65.5.0.dist-info/*
/home/mieszko/Repos/uncleG/zope.dottedname/.venv/lib/python3.9/site-packages/setuptools-65.5.0.virtualenv
/home/mieszko/Repos/uncleG/zope.dottedname/.venv/lib/python3.9/site-packages/setuptools/*
Proceed (Y/n)? Y
Successfully uninstalled setuptools-65.5.0
(.venv) ~/R/u/zope.dottedname (patch-1) $ pip install zc.buildout
Collecting zc.buildout
Using cached zc.buildout-3.0.1-py2.py3-none-any.whl (168 kB)
Requirement already satisfied: pip in ./.venv/lib/python3.9/site-packages (from zc.buildout) (22.3)
Requirement already satisfied: wheel in ./.venv/lib/python3.9/site-packages (from zc.buildout) (0.37.1)
Collecting setuptools>=8.0
Using cached setuptools-65.5.1-py3-none-any.whl (1.2 MB)
Installing collected packages: setuptools, zc.buildout
Successfully installed setuptools-65.5.1 zc.buildout-3.0.1
[notice] A new release of pip available: 22.3 -> 22.3.1
[notice] To update, run: pip install --upgrade pip
(.venv) ~/R/u/zope.dottedname (patch-1) $ buildout
Develop: '/home/mieszko/Repos/uncleG/zope.dottedname/.'
/home/mieszko/Repos/uncleG/zope.dottedname/.venv/lib/python3.9/site-packages/setuptools/dist.py:286: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420).
warnings.warn(msg, SetuptoolsDeprecationWarning)
/home/mieszko/Repos/uncleG/zope.dottedname/.venv/lib/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/home/mieszko/Repos/uncleG/zope.dottedname/.venv/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
warning: no files found matching '*.txt' under directory 'docs'
Getting distribution for 'zc.recipe.testrunner'.
Got zc.recipe.testrunner 2.2.
Getting distribution for 'zc.recipe.egg>=1.2.0,>=2.0.6'.
[notice] A new release of pip available: 22.3 -> 22.3.1
[notice] To update, run: pip install --upgrade pip
Got zc.recipe.egg 2.0.7.
Getting distribution for 'zope.testrunner'.
Got zope.testrunner 5.5.1.
Getting distribution for 'zope.interface'.
Got zope.interface 5.5.1.
Getting distribution for 'zope.exceptions'.
Got zope.exceptions 4.6.
Getting distribution for 'six'.
Got six 1.16.0.
Uninstalling test.
Installing test.
Develop distribution: zope.dottedname 5.1.dev0
uses namespace packages but the distribution does not require setuptools.
Generated script '/home/mieszko/Repos/uncleG/zope.dottedname/bin/test'. @dataflake thanks for notice; I saw CONTRIBUTING.md but I thought it is more like a "typo" case. I have no printer in home so if it is not a problem and the change is desired, please commit the change beyond this PR, I'll be happy anyway:) If not, I'll try to print the notice elsewhere and come back later. |
@d-maurer ah, ok, I misunderstood the message it is exactly as you said. Albait I have no idea why EDIT setuptools is added automatically: https://github.com/buildout/buildout/blob/297aaa0512fd056ebd2a31521e5200e9bed43b28/src/zc/buildout/easy_install.py#L644 May also relates to this issue: buildout/buildout#364 |
We import pkg_resources is distributed as part of setuptools, thus this dependency is necessary. |
Looks like this is not needed for a lib runtime, only for the installation.
This will allow to workaround some problems with other build tools like this one python-poetry/poetry#4242