8000 Fix setuptools sdist by charris · Pull Request #7131 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Fix setuptools sdist #7131

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 3 commits into from
Jan 27, 2016
Merged

Fix setuptools sdist #7131

merged 3 commits into from
Jan 27, 2016

Conversation

charris
Copy link
Member
@charris charris commented Jan 27, 2016

Fix for #7127: Setuptools sdist doesn't include all the files in the extension sources list.

Also add test installing from sdist archive to TravisCI.

Ralf Gommers added 3 commits January 27, 2016 14:47
This was seriously broken.  Setuptools does unwanted 'smart' things and
ignores MANIFEST.in.  Closes numpygh-7127.
Warn in numpy/distutils/command/egg_info.py if using setuptools.sdist.

See numpygh-7127 for details.
@rgommers
Copy link
Member

Checked the build log of the USE_SDIST run on TravisCI, all looks good.

@njsmith
Copy link
Member
njsmith commented Jan 27, 2016

Do we know why that test didn't catch this in the first place?

On Wed, Jan 27, 2016 at 2:12 PM, Ralf Gommers notifications@github.com
wrote:

Checked the build log of the USE_SDIST run on TravisCI, all looks good.


Reply to this email directly or view it on GitHub
#7131 (comment).

Nathaniel J. Smith -- https://vorpus.org http://vorpus.org

@charris
Copy link
Member Author
charris commented Jan 27, 2016

@njsmith The test installing from the sdist created archive is new. Don't know if that answers your question.

charris added a commit that referenced this pull request Jan 27, 2016
@charris charris merged commit 2b34f4b into numpy:master Jan 27, 2016
@charris charris deleted the fix-setuptools-sdist branch January 27, 2016 22:37
@njsmith
Copy link
Member
njsmith commented Jan 27, 2016

Ah, right, sorry :-) I guess I misremembered us adding something like that
before...

On Wed, Jan 27, 2016 at 2:35 PM, Charles Harris notifications@github.com
wrote:

Merged #7131 #7131.


Reply to this email directly or view it on GitHub
#7131 (comment).

Nathaniel J. Smith -- https://vorpus.org http://vorpus.org

@charris charris mentioned this pull request Jan 27, 2016
@charris charris removed this from the 1.11.0 release milestone Jan 27, 2016
@rgommers
Copy link
Member

Ah, right, sorry :-) I guess I misremembered us adding something like that before...

The wheel tests were added fairly recently, but those don't exercise sdist (yet, I fear)

from setuptools.command.egg_info import egg_info as _egg_info

class egg_info(_egg_info):
def run(self):
if 'sdist' in sys.argv:
import warnings
warnings.warn("`build_src` is being run, this may lead to missing "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@charris @rgommers I ran into this issue with one of the skimage tools, which checks to see whether our MANIFEST file is complete. It says to look at gh-7127, but I'm not sure what to look at! Could we point to a likely fix in this message instead? I am happy to make the patch, but was hoping you could point me in the right direction.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the tool executing python setup.py sdist, for what it's worth: https://github.com/stefanv/scikit-image/blob/check_sdist/tools/check_sdist.py#L12

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix is in this PR: 6770f98

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the skimage setup.py you don't have any sdist handling, so you also have to add something like cmdclass={'sdist': sdist} or (better) the sdist_checked version that numpy and scipy have.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @rgommers, that's very helpful.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're welcome. I'll try to get around to tweaking the warning message.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It took a while, but addressed in gh-8761

rgommers added a commit to rgommers/numpy that referenced this pull request Mar 9, 2017
DougBurke added a commit to DougBurke/sherpa that referenced this pull request Jul 8, 2022
Numpy warns if you use the setuptools sdist - see
numpy/numpy#7131 - so revert this change
for now.
DougBurke added a commit to DougBurke/sherpa that referenced this pull request Jul 28, 2022
Numpy warns if you use the setuptools sdist - see
numpy/numpy#7131 - so revert this change
for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0