Skip to content

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

Merged
merged 8 commits into from
Nov 14, 2020
Merged

CLN: clean setup.py #37732

merged 8 commits into from
Nov 14, 2020

Conversation

fangchenli
Copy link
Member

an attempt to clean setup.py

Copy link
Member

@WillAyd WillAyd left a 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
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member Author

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.

@WillAyd WillAyd added the Build Library building on various platforms label Nov 10, 2020
@WillAyd
Copy link
Member

WillAyd commented Nov 11, 2020 via email

@fangchenli
Copy link
Member Author

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.

@fangchenli
Copy link
Member Author

The runtime for the windows build seems normal now.

@jreback jreback added this to the 1.2 milestone Nov 14, 2020
@jreback jreback merged commit fee6675 into pandas-dev:master Nov 14, 2020
@jreback
Copy link
Contributor

jreback commented Nov 14, 2020

thanks @fangchenli

@fangchenli fangchenli deleted the clean-setup branch December 5, 2020 18:49
@simonjayhawkins simonjayhawkins mentioned this pull request Dec 5, 2020
@@ -16,10 +17,10 @@
import shutil
import sys

import pkg_resources
from setuptools import Command, find_packages, setup
import numpy
Copy link

@agon-shabi agon-shabi Jan 8, 2021

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?

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 :/

Copy link
Member Author

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+.

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 🙏

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

Successfully merging this pull request may close these issues.

4 participants