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

Fix broken Python packaging #74

Merged
merged 1 commit into from
Apr 19, 2022
Merged

Conversation

jsf9k
Copy link
Member

@jsf9k jsf9k commented Apr 13, 2022

🗣 Description

This pull request adds a package_dir attribute to setup.py in order to address broken Python packaging.

Note that this pull request cannot be merged until after #70 is approved and merged.

💭 Motivation and context

Since this Python module doesn't use a standard src-layout, setuptools gets confused and is unable to locate the packages to be included in the module. Since this "Python module" is really just a collection of scripts located in the project_setup/scripts directory, we can tell setuptools to restrict itself to that directory.

This is yet another reason why #33 is a good idea.

🧪 Testing

All automated tests pass. I have used these changes to successfully create a Python virtual environment in which this module is installed. This was not possible before these changes.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

@jsf9k jsf9k added the bug This issue or pull request addresses broken functionality label Apr 13, 2022
@jsf9k jsf9k self-assigned this Apr 13, 2022
@jsf9k jsf9k marked this pull request as ready for review April 15, 2022 14:44
@jsf9k jsf9k requested review from dav3r, felddy and mcdonnnj as code owners April 15, 2022 14:44
Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

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

Good by me. Thanks for fixing this. 👍

Copy link
Member

@mcdonnnj mcdonnnj left a comment

Choose a reason for hiding this comment

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

Thanks for making this usable again. I am completely with you on #33.

Since this Python module doesn't use a standard src-layout, setuptools
gets confused and is unable to locate the packages to be included.
Since this "Python module" is really just a collection of scripts, we
can tell setuptools to restrict itself to project_setup/scripts.

This is yet another reason why #33 is a good idea.
@jsf9k jsf9k force-pushed the bugfix/fix-broken-python-packaging branch from 4e2056c to e28489e Compare April 19, 2022 19:20
@jsf9k jsf9k merged commit 67f4ff9 into develop Apr 19, 2022
@jsf9k jsf9k deleted the bugfix/fix-broken-python-packaging branch April 19, 2022 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue or pull request addresses broken functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants