-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: clean setup.py #37732
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
CLN: clean setup.py #37732
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely worth doing but need to be careful here. Looks like at least the Windows builds are taking significantly longer - is that perhaps related?
setup.py
Outdated
cython = True | ||
from Cython import Tempita as tempita | ||
from Cython import Tempita | ||
from Cython.Distutils.build_ext import build_ext as _build_ext |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm we should do this but might want to be careful - any idea what the difference is with the new build_ext command?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look into this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the cython source code. The new build_ext is just
setuptools.command.build_ext
or distutils.command.build_ext
. But I'm not sure how it differs from the old_build_ext.
We don’t need to go into the details - just want to make sure this doesn’t cause regressions like the build time slowdown called out before
…Sent from my iPhone
On Nov 11, 2020, at 2:21 PM, Fangchen Li ***@***.***> wrote:
@fangchenli commented on this pull request.
In setup.py:
> if _CYTHON_INSTALLED:
- from Cython.Distutils.old_build_ext import old_build_ext as _build_ext
-
- cython = True
- from Cython import Tempita as tempita
+ from Cython import Tempita
+ from Cython.Distutils.build_ext import build_ext as _build_ext
Looking at the cython source code. The new build_ext is just
setuptools.command.build_ext or distutils.command.build_ext. But I'm not sure how it differs from the old_build_ext.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Sure, the windows np16 build does seem slower than before. I'll test it more. |
The runtime for the windows build seems normal now. |
thanks @fangchenli |
@@ -16,10 +17,10 @@ | |||
import shutil | |||
import sys | |||
|
|||
import pkg_resources | |||
from setuptools import Command, find_packages, setup | |||
import numpy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fangchenli I think the addition of this line has broken my package (internal to my organisation) - what happens if one tries to install pandas without numpy already installed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using python 3.6, and it appears that there's no wheel for it on PyPI (only 3.7+) - that, in conjunction with this change means when I pip install pandas
the source distribution is downloaded and its setup.py
run to determine its dependencies (as opposed to having them statically defined, as would be in a wheel), and the whole thing falls over :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, you should pin pandas version to <=1.1.5. pandas stopped py3.6 support starting from 1.2.0. pandas and many other numpy based scientific libraries are moving toward NEP29. So, if your work heavily depends on the numpy ecosystem, it might be a good time to think about moving to py3.7+.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that seems the most sensible approach for me in the short term - thanks for the information, evidently I missed a memo 🙏
an attempt to clean setup.py