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

Get the correct Python ABI tag of selected interpreter #379

Merged
merged 5 commits into from
Apr 6, 2021

Conversation

linw1995
Copy link
Member

@linw1995 linw1995 commented Apr 4, 2021

Pull Request Check List

  • A news fragment is added in news/ describing what is new.
  • Test cases added for changed code.

Describe what you have changed in this PR.

resolve #378

get_abbr_impl is copied from https://github.com/pypa/packaging/blob/14ad3520dc866295963c677c6813646b8a59a6a6/packaging/tags.py#L801-L811

@frostming
Copy link
Collaborator

We could start to collect the in-process scripts in their own folder. Can you help do it in this PR?

pdm/models/in_process
- __init__.py    # Exports all functions here
- pep508.py
- get_abi_tag.py

@pdm-project pdm-project deleted a comment from sourcery-ai bot Apr 6, 2021
@linw1995
Copy link
Member Author

linw1995 commented Apr 6, 2021

Very happy to help to do it.

@frostming
Copy link
Collaborator

This way we can directly use the __file__ variable to get rid of importlib.import

@codecov-io
Copy link

codecov-io commented Apr 6, 2021

Codecov Report

Merging #379 (1e958f7) into master (db63172) will increase coverage by 0.48%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #379      +/-   ##
==========================================
+ Coverage   82.30%   82.79%   +0.48%     
==========================================
  Files          63       63              
  Lines        5183     5160      -23     
  Branches      933      926       -7     
==========================================
+ Hits         4266     4272       +6     
+ Misses        645      619      -26     
+ Partials      272      269       -3     
Flag Coverage Δ
unittests 82.75% <85.71%> (+0.52%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pdm/utils.py 71.32% <ø> (+3.67%) ⬆️
pdm/models/builders.py 81.52% <50.00%> (ø)
pdm/models/pip_shims.py 90.19% <66.66%> (+8.94%) ⬆️
pdm/models/environment.py 85.78% <100.00%> (+0.54%) ⬆️
pdm/models/in_process/__init__.py 90.00% <100.00%> (ø)
pdm/cli/actions.py 74.48% <0.00%> (ø)
pdm/cli/utils.py 81.34% <0.00%> (+0.79%) ⬆️
pdm/formats/requirements.py 87.09% <0.00%> (+1.07%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d48c6d3...1e958f7. Read the comment docs.

@frostming frostming merged commit b5f2e23 into pdm-project:master Apr 6, 2021
@frostming
Copy link
Collaborator

Thank you for taking care of this

@linw1995 linw1995 deleted the bugfix/378 branch April 12, 2021 17:41
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.

PackageFinder.find_requirement always fallback to sdist because being given the wrong ABI tag
3 participants