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

Update wheel.py #260

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update wheel.py #260

wants to merge 1 commit into from

Conversation

nylocx
Copy link

@nylocx nylocx commented Dec 23, 2021

Fix an error that caused excluded files to be added to the wheel

Resolves: python-poetry#

  • Added tests for changed code.
  • Updated documentation for changed code.

Fix an error that caused excluded files to be added to the wheel
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 2 Security Hotspots
Code Smell D 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@finswimmer finswimmer left a comment

Choose a reason for hiding this comment

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

Could you please provide a test that covers this change?

@nylocx
Copy link
Author

nylocx commented Dec 23, 2021

I currently don't have the time to write a complete test case that could be integrated here, but I have produced a minimal example to showcase this issue:
https://github.com/nylocx/poetry-cython-demo

Building this results in:

poetry build -vvv -f wheel
Using virtualenv: /root/.cache/pypoetry/virtualenvs/poetry-cython-demo-Wrv1XBJQ-py3.9
Building poetry-cython-demo (0.1.0)
  - Building wheel
  - Adding: /root/poetry-cython-demo/poetry_cython_demo/__init__.py
  - Adding: /root/poetry-cython-demo/poetry_cython_demo/cython_code.c
A setup.py file already exists. Using it.
running build
running build_py
running build_ext
  - Adding: cython_code.cpython-39-x86_64-linux-gnu.so
  - Adding: poetry_cython_demo/cython_code.pyx
Skipping: /root/poetry-cython-demo/COPYING
Skipping: /root/poetry-cython-demo/LICENSE
  - Built poetry_cython_demo-0.1.0-cp39-cp39-manylinux_2_31_x86_64.whl

Note the adding after the running build_ext this is coming from the section I changed with the line in the pull request.

In this example I had to remove the other bug that is fixed in with #228 because I could not get a poetry version that includes the fix even an:
curl -sSL https://install.python-poetry.org | python3 - --git https://github.com/python-poetry/poetry.git@master
and a manual pip --update install git+https://github.com/python-poetry/poetry-core.git in poetries venv did not solve it.

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

Successfully merging this pull request may close these issues.

2 participants