Improve setup.py to allow dev publication
issue3436 issue1891 review2441002
This commit is contained in:
@@ -5,20 +5,33 @@
|
||||
from setuptools import setup, find_packages
|
||||
import os
|
||||
|
||||
PACKAGE, VERSION, LICENSE, WEBSITE = None, None, None, None
|
||||
execfile(os.path.join('trytond', 'version.py'))
|
||||
|
||||
|
||||
def read(fname):
|
||||
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
||||
|
||||
major_version, minor_version, _ = VERSION.split('.', 2)
|
||||
major_version = int(major_version)
|
||||
minor_version = int(minor_version)
|
||||
|
||||
download_url = 'http://downloads.tryton.org/%s.%s/' % (
|
||||
major_version, minor_version)
|
||||
if minor_version % 2:
|
||||
VERSION = '%s.%s.dev0' % (major_version, minor_version)
|
||||
download_url = 'hg+http://hg.tryton.org/%s#egg=%s-%s' % (
|
||||
PACKAGE, PACKAGE, VERSION)
|
||||
|
||||
setup(name=PACKAGE,
|
||||
version=VERSION,
|
||||
description='Tryton server',
|
||||
long_description=read('README'),
|
||||
author='Tryton',
|
||||
author_email='issue_tracker@tryton.org',
|
||||
url=WEBSITE,
|
||||
download_url=("http://downloads.tryton.org/" +
|
||||
VERSION.rsplit('.', 1)[0] + '/'),
|
||||
download_url=download_url,
|
||||
keywords='business application platform ERP',
|
||||
packages=find_packages(exclude=['*.modules.*', 'modules.*', 'modules',
|
||||
'*.proteus.*', 'proteus.*', 'proteus']),
|
||||
package_data={
|
||||
@@ -54,6 +67,7 @@ setup(name=PACKAGE,
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Topic :: Software Development :: Libraries :: Application Frameworks',
|
||||
],
|
||||
platforms='any',
|
||||
license=LICENSE,
|
||||
install_requires=[
|
||||
'lxml >= 2.0',
|
||||
@@ -77,4 +91,4 @@ setup(name=PACKAGE,
|
||||
zip_safe=False,
|
||||
test_suite='trytond.tests',
|
||||
test_loader='trytond.test_loader:Loader',
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user