Moving __version__ to a dedicated _version.py file within margaritashotgun.
Leaving this attribute within the margaritashotgun/__init__.py causes issues when importing from setup.py. This is due to the fact that the Client is also imported in that same file, and the Client has dependencies that eventually depend on enum which may/may not be be installed.
Updating margaritashotgun/__init__.py to import this attribute, so the version import in margaritashotgun/cli.py does not have to change.
The setup.py script will now reads in the contents of the _version.py file and uses a regex to extract the version from it. This has the benefit of not performing any imports from the package being installed via setuptools during the installation process.
Tested
Tested pip installing this locally to ensure the proper version of 0.4.1 is being installed. Used the following command:
resolves: #20 to: @andrewkrug
Changes
__version__
to a dedicated_version.py
file withinmargaritashotgun
.margaritashotgun/__init__.py
causes issues when importing from setup.py. This is due to the fact that theClient
is also imported in that same file, and the Client has dependencies that eventually depend onenum
which may/may not be be installed.margaritashotgun/__init__.py
to import this attribute, so the version import inmargaritashotgun/cli.py
does not have to change.setup.py
script will now reads in the contents of the_version.py
file and uses a regex to extract the version from it. This has the benefit of not performing any imports from the package being installed via setuptools during the installation process.Tested
pip install
ing this locally to ensure the proper version of 0.4.1 is being installed. Used the following command:$ pip install git+file://$HOME/repos/margaritashotgun@ryandeivert-fix-versioning
$ pip list | grep marg
: