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

Move from distutils to setuptools #5

Merged
merged 10 commits into from
Aug 11, 2022
Merged

Move from distutils to setuptools #5

merged 10 commits into from
Aug 11, 2022

Conversation

RKrahl
Copy link
Owner

@RKrahl RKrahl commented Aug 11, 2022

Move from distutils to setuptools as far as sensible. Close #4.

Note that with this change, the command classes defined by distutils-pytest are not silently injected into the distutils.command package anymore. They need to be explicitly listed in the cmdclass keyword argument to setup() now. Custom code needs to be changed from:

from distutils.core import setup
try:
    import distutils_pytest
except ImportError:
    pass

setup(
    name = "dummy",
    packages = ["dummy"],
)

to:

from distutils.core import setup
try:
    import distutils_pytest
    cmdclass = dict(distutils_pytest.cmdclass)
except (ImportError, AttributeError):
    cmdclass = dict()

setup(
    name = "dummy",
    packages = ["dummy"],
    cmdclass = cmdclass,
)

@RKrahl RKrahl added the compatibility Issues about compatibility with libraries or other packages label Aug 11, 2022
@RKrahl RKrahl added this to the 0.2 milestone Aug 11, 2022
@RKrahl RKrahl merged commit f06d824 into master Aug 11, 2022
@RKrahl RKrahl deleted the setuptools branch August 11, 2022 20:52
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Issues about compatibility with libraries or other packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

setuptools breaks distutils-pytest
1 participant