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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
MAINT: warn in egg_info command if using setuptools.sdist.
Warn in numpy/distutils/command/egg_info.py if using setuptools.sdist.

See gh-7127 for details.
  • Loading branch information
Ralf Gommers authored and charris committed Jan 27, 2016
commit 6ae1ff280b3a6c115fe468c79c5cf4f16f998f89
8 changes: 8 additions & 0 deletions numpy/distutils/command/egg_info.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@ 8000
from __future__ import division, absolute_import, print_function

import sys

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

"files in your sdist! See numpy issue gh-7127 for "
"details", UserWarning)

# We need to ensure that build_src has been executed in order to give
# setuptools' egg_info command real filenames instead of functions which
# generate files.
Expand Down
0