Skip to content

Comments

Removed redundant specification of version number#2926

Merged
ColCarroll merged 3 commits intomasterfrom
redundant_versions
Apr 13, 2018
Merged

Removed redundant specification of version number#2926
ColCarroll merged 3 commits intomasterfrom
redundant_versions

Conversation

@fonnesbeck
Copy link
Member

The package version currently resides in 4 different places. This change eliminates all but one, making maintenance easier.

@ColCarroll
Copy link
Member

I'm pretty sure this fails on pip install because it will import pymc3 before installing requirements (trying pip install -e . locally fails because numpy isn't yet installed. Will probably pass on travis since we install dependencies separately.

I have used the pattern from https://github.com/pypa/pip/blob/master/setup.py to only define the version in 1 place before (essentially, read the __init__.py file, and use a regex to parse out the version).

@fonnesbeck
Copy link
Member Author

I tested it locally with pip install -e . into a clean virtualenv and had no errors.

@twiecki
Copy link
Member

twiecki commented Apr 11, 2018

@fonnesbeck that's because you ran this from the pymc3 root dir which allows import pymc3 to work. I think a better solution is to use versioneer. https://github.com/warner/python-versioneer

@fonnesbeck
Copy link
Member Author

fonnesbeck commented Apr 11, 2018

No, this installs fine when installed from elsewhere too.

$ pip install -e Repos/pymc3 

I'd prefer not to invoke a third-party package if possible.

@fonnesbeck
Copy link
Member Author

I think as long as the import does not try to access any compiled code, this works fine.

@ColCarroll
Copy link
Member

ColCarroll commented Apr 11, 2018 via email

@fonnesbeck
Copy link
Member Author

@ColCarroll actually, I'm sure you are right. My virualenv is probably falling back on a global site-packages. I will try your regex approach.

setup.py Outdated
URL = "https://github.com/pymc-devs/pymc3"
LICENSE = "Apache License, Version 2.0"
VERSION = "3.4rc1"
LICENSE = "Apachimport numpye License, Version 2.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like stray characters here

@fonnesbeck
Copy link
Member Author

Are we okay with this?

@ColCarroll
Copy link
Member

Yep!

@ColCarroll ColCarroll merged commit a0ec8e2 into master Apr 13, 2018
@eigenfoo eigenfoo deleted the redundant_versions branch January 1, 2020 22:08
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.

3 participants