forked from evonove/django-money-rates
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,57 @@ | ||
# -*- coding: utf-8 -*- | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
from setuptools import setup, find_packages | ||
import os | ||
import sys | ||
import re | ||
|
||
|
||
import djmoney_rates | ||
def get_version(package): | ||
""" | ||
Return package version as listed in `__version__` in `init.py`. | ||
""" | ||
init_py = open(os.path.join(package, '__init__.py')).read() | ||
return re.match("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1) | ||
|
||
try: | ||
from setuptools import setup | ||
except ImportError: | ||
from distutils.core import setup | ||
|
||
version = djmoney_rates.__version__ | ||
version = get_version('djmoney_rates') | ||
|
||
if sys.argv[-1] == 'publish': | ||
os.system('python setup.py sdist upload') | ||
print("You probably want to also tag the version now:") | ||
print(" git tag -a %s -m 'version %s'" % (version, version)) | ||
print(" git push --tags") | ||
sys.exit() | ||
|
||
readme = open('README.rst').read() | ||
history = open('HISTORY.rst').read().replace('.. :changelog:', '') | ||
LONG_DESCRIPTION = open('README.rst').read() | ||
|
||
setup( | ||
name='django-money-rates', | ||
version=version, | ||
description='Currency conversion for money', | ||
long_description=readme + '\n\n' + history, | ||
author='Federico Frenguelli', | ||
author_email='[email protected]', | ||
url='https://github.com/evonove/django-money-rates', | ||
packages=[ | ||
'djmoney_rates', | ||
], | ||
include_package_data=True, | ||
install_requires=[ | ||
], | ||
license="BSD", | ||
zip_safe=False, | ||
keywords='django-money-rates', | ||
long_description=LONG_DESCRIPTION, | ||
classifiers=[ | ||
'Development Status :: 2 - Pre-Alpha', | ||
'Framework :: Django', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: BSD License', | ||
'Natural Language :: English', | ||
"Programming Language :: Python :: 2", | ||
'Programming Language :: Python :: 2.6', | ||
"Operating System :: OS Independent", | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.3', | ||
"Programming Language :: Python :: 3.2", | ||
"Programming Language :: Python :: 3.3", | ||
"Programming Language :: Python :: 3.4", | ||
"Programming Language :: Python :: 3.5", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Framework :: Django", | ||
"Framework :: Django :: 1.8", | ||
"Framework :: Django :: 1.9", | ||
"Framework :: Django :: 1.10", | ||
], | ||
keywords='django-money-rates', | ||
author='Federico Frenguelli', | ||
author_email='[email protected]', | ||
url='https://github.com/evonove/django-money-rates', | ||
license="BSD", | ||
packages=find_packages(), | ||
include_package_data=True, | ||
test_suite='runtests', | ||
install_requires=[ | ||
'py-moneyed==0.5.0' | ||
], | ||
zip_safe=False, | ||
) |