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

Add dist-packages to check if install is development or not #185

Closed

Conversation

magnunor
Copy link
Contributor

@magnunor magnunor commented Nov 20, 2023

See #184

Progress of the PR

  • Change implemented
  • add a changelog entry in the upcoming_changes folder (see upcoming_changes/README.rst),
  • Check formatting of the changelog entry (and eventual user guide changes) in the docs/readthedocs.org:rosettasciio build of this PR (link in github checks)
  • ready for review.

When installing rosettasciio to system-wide Python in
linux systems (at least Ubuntu and other Debian variants).
The library is placed in the "dist-packages" folder, not
"site-packages". This lead the rosettasciio to not work
in those situations.
@magnunor magnunor force-pushed the dist-packages_check_dev_version branch from 76400a0 to 8f716fc Compare November 20, 2023 09:32
@magnunor
Copy link
Contributor Author

Some tests related to exspy are failing, which seems to be related to a similiar issue in exspy? Ergo that setuptools-scm can't find the version number in the build requirements?

LookupError: setuptools-scm was unable to detect version for /tmp/pip-req-build-8_s83223.

I got a feeling that way of getting the version is a bit fragile, especially when there are various automated processes which doesn't follow the expected folder/path/... . A possible solution could be to make it return a None for the version number if it can't find the git version?

@ericpre
Copy link
Member

ericpre commented Nov 20, 2023

This error is normal, because there are no git repository. The workflow needs to be updated to:

pip install git+https://github.com/hyperspy/exspy.git

https://packaging.python.org/en/latest/tutorials/installing-packages/#installing-from-vcs

We could fall back to a hardcoded version like "dev"? We will not need to keep updating the version when releasing and this would be useful to allow installing from a path without git being available.

@ericpre ericpre mentioned this pull request Nov 29, 2023
8 tasks
@magnunor
Copy link
Contributor Author

magnunor commented Dec 1, 2023

Superseded by #187

@magnunor magnunor closed this Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants