Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@fritzo
Copy link
Member

@fritzo fritzo commented Nov 10, 2017

  1. Move pyro version string from setup.py to pyro.__init__.py so it is available as pyro.__version__. (This is common practice.)
  2. Parse README.md in setup.py so it can display on https://pypi.python.org/pypi/pyro-ppl (Also common practice)

Tests cancelled after linting.

@fritzo fritzo requested a review from neerajprad November 10, 2017 18:18
@fritzo fritzo changed the title Parse __version__ and README.md in setup.py Parse pyro.__version__ and README.md in setup.py Nov 10, 2017

# Find pyro version.
for line in open('pyro/__init__.py'):
if line.startswith('__version__ = '):
Copy link
Member

Choose a reason for hiding this comment

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

Would pyro.__version__ not work here?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is avoided since the pyro module would requires setup.py would require pyro ...
Also text parsing is faster than loading all of pyro as is done in pyro/__init__.py.

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense.

version='0.1.1',
version=version,
description='A Python library for probabilistic modeling and inference',
long_description=long_description,
Copy link
Member

Choose a reason for hiding this comment

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

Nice.

@fritzo
Copy link
Member Author

fritzo commented Nov 10, 2017

Ok, I'm ready to merge. I'd like to get this in before the 0.1.2 patch release so we can have a nice pypi page 😃

[Getting Started](http://pyro.ai/examples) | [Documentation](http://docs.pyro.ai/) | [Contributing](CONTRIBUTING.md)
[Getting Started](http://pyro.ai/examples) |
[Documentation](http://docs.pyro.ai/) |
[Contributing](https://github.com/uber/pyro/blob/master/CONTRIBUTING.md)
Copy link
Member Author

Choose a reason for hiding this comment

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

changed this to an absolute link so it still works on pypi.python.org

@fritzo
Copy link
Member Author

fritzo commented Nov 10, 2017

@neerajprad would you mind merging this so I can rebase #553 ?

@neerajprad neerajprad merged commit 35e7ded into dev Nov 10, 2017
@neerajprad neerajprad deleted the improve-setup-py branch November 10, 2017 18:55
@fritzo
Copy link
Member Author

fritzo commented Nov 10, 2017

Thanks!

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.

3 participants