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

Egg include setup py #1554

merged 4 commits into from Nov 4, 2018


Copy link

@shashanksingh28 shashanksingh28 commented Oct 28, 2018

Summary of changes

While creating sdists, we want the source dist .tar.gz to contain because this is what pip would use to install the source distribution. python sdist ensured was included because distutils by default adds the script_name that was executing the build process. However, for someone calling build_sdist('.') programatically, the script name is the script callind build_sdist function and not

The problem is that sdist command uses the egg-info command to extract file list to be tar-ziped, which did not include as default (unless it was called via '' as the script name). This fix adds an explicit check in the egg-info command for

An alternative solution is solving this one level deeper at distutils add_defaults method which egg-info command uses.

Closes #1506

Will update changelog once we agree on the approach

Pull Request Checklist

  • Changes have tests
  • News fragment added in changelog.d. See documentation for details

Copy link

@shashanksingh28 Can you add a changelog here? changelog.d/1554.change.rst

Copy link

@gaborbernat Do you mind taking a look at this? Are there tests that cover your use case?

Copy link

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

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

It does solve my problem, thanks a lot !

changelog.d/1554.change.rst Outdated Show resolved Hide resolved
setuptools/command/ Outdated Show resolved Hide resolved
setuptools/tests/ Outdated Show resolved Hide resolved
setuptools/tests/ Show resolved Hide resolved
@pganssle pganssle moved this from Submitted PRs to Approved PRs in PyPA Sprint Weekend at Bloomberg (2018) Nov 1, 2018
pganssle pushed a commit to shashanksingh28/setuptools that referenced this pull request Nov 2, 2018
This tests that `` is included by default in the distribution
with the egg_info command and when an sdist is built with
pganssle pushed a commit to shashanksingh28/setuptools that referenced this pull request Nov 3, 2018
@pganssle pganssle merged commit 46af765 into pypa:master Nov 4, 2018
PyPA Sprint Weekend at Bloomberg (2018) automation moved this from Approved PRs to Merged PRs Nov 4, 2018
Copy link

pganssle commented Nov 4, 2018

@shashanksingh28 Thanks for your PR, and thanks for following up with all the changes!

Copy link
Contributor Author

Thanks @pganssle and @gaborbernat for your help :) This was my first open source PR, will try to be more involved

@pganssle pganssle mentioned this pull request Nov 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
No open projects

Successfully merging this pull request may close these issues.

build_meta does not include
3 participants