This adds both the license and long_description to pypi.
It just uses the contents from LICENSE and README.markdown to populate these fields.
(ISSUE #146) Adds license and long_description for pypi
One other thing. I tried automatically adding the version from reversion/__init__.py but because you're importing django as well there's no simple way to do it.
Couple of solutions I thought of:
1. Read __init__.py and then parse through with a regex searching for the VERSION
2. Create reversion/version.py and import that into __init__.py and setup.py
The second solution is much cleaner IMO but it requires an extra file and it's up to you. This would mean you'd only need to update the version in that one place and you could have it import into setup.py for both version and for your download links.
First solution is definitely not good idea.
I agree with @charettes, I just included it because some other large projects use that.
Your code will still be embedding markdown syntax in pypi. I suppose that's better than the broken ascii!
What's the problem with
from reversion import VERSION
In any case, solution 2 is clearly better!
from reversion import VERSION dies in fire because __init__.py also includes import django which exceptions out when pypi runs setup.py
Ah, I see. D'oh!
If you can implement your solution 2, then I'll gladly pull this in.
Moved version to reversion/version.py
A little more hacky than I usually like to make sure everything is backwards compatible.
Why the version here? Isn't this just adding lines of code for no reason?
Nice markdown formatting error there. I mean __version__
__version__ is the PEP standard. Because you've used VERSION every where else I didn't want to break backwards compatibility incase anyone is relying on VERSION. http://www.python.org/dev/peps/pep-0396/
You're pulled! Many thanks! I've learned something today. :)
IMHO it's better to store __version__ = (1, 6, 0) in src/reversion/__init__.py: It's more common, isn't it?
__version__ = (1, 6, 0)
It is but it then can't be used for setup.py on pypi due to dependency issues
I wonder... what if we were to move the django version check into models.py, or similar? That would still be auto-imported by django, and allow us to keep things more consistent.