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

1.12.1: wrapt is usimg distutils #178

Closed
kloczek opened this issue Jun 5, 2021 · 4 comments
Closed

1.12.1: wrapt is usimg distutils #178

kloczek opened this issue Jun 5, 2021 · 4 comments

Comments

@kloczek
Copy link

kloczek commented Jun 5, 2021

I was a bit surprised that after packaging +400 module as rpm packages I found first module which is not using setuptools or pep517 and I was not able to build documentation using setup.py build_sphinx.

+ /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'build_sphinx'

Looks like wrapt is using distutils. I think that it would be good to swotch to setuptools.
https://stackoverflow.com/questions/25337706/setuptools-vs-distutils-why-is-distutils-still-a-thing
Here is minimal patch which is working for me but it would be good IMO switch fully to setuptools

--- a//setup.py~        2020-03-09 02:31:25.000000000 +0000
+++ b//setup.py 2021-06-05 15:47:12.899054863 +0100
@@ -3,9 +3,9 @@
 import os
 import sys

-from distutils.core import setup
+from setuptools import setup
 from distutils.core import Extension
-from distutils.command.build_ext import build_ext

+from setuptools.command.build_ext import build_ext
 from distutils.errors import (CCompilerError, DistutilsExecError,
                 DistutilsPlatformError)

With that patch I was able to build module and its documentation usimg setuptools

@GrahamDumpleton
Copy link
Owner

Am trying to enlist via Twitter people to help and/or take over wrapt. From that someone has I believe addressed this issue in a PR that was created. I still need to review the PR and merge it but hope to get to it quickly.

@kloczek
Copy link
Author

kloczek commented Jun 7, 2021

I would suggest to broadcast that on some python developers forums/mailing lists.
I'm still learning python.
My patch is only kind of JFDI and by that it needs to be done properly.

@GrahamDumpleton
Copy link
Owner

Switch to setuptools is done in version 1.13.0.

@kloczek
Copy link
Author

kloczek commented Aug 13, 2021

Switch to setuptools is done in version 1.13.0.

OK Thx :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants