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 pypi installation files, readme type, and pytest args #120

Merged
merged 2 commits into from Jan 8, 2020

Conversation

hakonanes
Copy link
Member

@hakonanes hakonanes commented Jan 8, 2020

Signed-off-by: Håkon Wiik Ånes hwaanes@gmail.com

Description

This PR attempts to fix which files are installed to site-packages/kikuchipy when installing from pip (i.e., either from the source distribution, .tar.gz, or the binary distribution, wheel).

I've updated the setup.py attribute package_data which, to my limited knowledge with Python package distribution, dictates which files are installed (not just uploaded to PyPI) when calling pip install kikuchipy. I've also updated the MANIFEST.in, which I thought did what package_data apparently does, to include all files in the repo, except the "hidden" files. Thus, the documentation is included in the source distribution.

Type of change

  • Bug-fix (non-breaking change which fixes an issue)

References

I've tried to understand package_data by reading these resources:

I hope this will fix #119, and hopefully fix the failing tests in my PR to conda-forge/staged-recipies (conda-forge/staged-recipes#10523).

How has this been tested?

  • This PR does not break tests or making the docs locally
  • Necessary files were include in site-packages/kikuchipy when packaging with python setup.py sdist bdist_wheel and installing from both the built tarball and wheel
  • Necessary files were included in site-packages/kikuchipy when packaging, uploading to https://test.pypi.org/project/kikuchipy/, and then installing from both the source and binary distributions
  • All tests pass when doing:
conda create -n kp2 python=3.7
conda activate kp2
pip install git+https://github.com/hakonanes/kikuchipy.git@fix-packaging
pip install pytest
cd ~/miniconda3/envs/kp2/lib/python3.7/site-packages/kikuchipy
pytest --pyargs kikuchipy

Final checklist:

  • My PR is the minimum possible work for the desired functionality
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
    - [ ] I have added tests that prove my fix is effective or that my feature works

Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
@hakonanes hakonanes added bug Something isn't working status: WIP labels Jan 8, 2020
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling c3e6a4e on hakonanes:fix-packaging into 417f5c5 on kikuchipy:master.

@hakonanes hakonanes changed the title [WIP] Update pypi installation files, readme type, and pytest args Update pypi installation files, readme type, and pytest args Jan 8, 2020
@hakonanes hakonanes merged commit 9d1269c into pyxem:master Jan 8, 2020
@hakonanes hakonanes deleted the fix-packaging branch January 8, 2020 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HyperSpy extension file not installed from source distribution on PyPI
2 participants