Skip to content

Conversation

@skilkis
Copy link

@skilkis skilkis commented Nov 5, 2020

This PR adds installation_requirements to setup.py and fixes the
installation errors due to these requirements not being available during
install time when setup.py is run. To fix this a static .version file is
created, removing the need for having the package version to be
specified in init.py of the pyscopus package. Furthermore,
setuptools_scm is use to get the latest Git tag when available.
Therefore, when the package is installed with a newer Git tag than the
static version available in .version; this file will be updated and
can later be commited.

Summary of Changes:

  • Removed version attribute from init.py
  • Added static .version file to contain the current package version
  • Removed import of pyscopus in setup.py to fix installation error
  • Changed HERE directory to ROOT_DIR and preferred use of Path
    class over os.path.abspath
  • Added setuptools_scm version that uses latest Git tag along with
    a fallback version from the .version file

This commit fixes installation errors due to the install_requirements
specified not being available during install time when setup.py is run.
To fix this a static .version file is created, removing the need for
having the package version to be specified in __init__.py of the
pyscopus package.

Summary of Changes:
- Removed __version__ attribute from __init__.py
- Added static .version file to contain the current package version
- Removed import of pyscopus in setup.py to fix installation error
- Changed `HERE` directory to `ROOT_DIR` and preferred use of Path
  class over os.path.abspath
This commit will enable setuptools to use the SCM (in this case Git)
version tags. The fallback when Git is unavailable is then the static
version stored in the .version file
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.

1 participant