fix setup.py
This commit is contained in:
parent
bd84ae360c
commit
c994ae4950
2
README
2
README
|
@ -5,7 +5,7 @@ This module is developed and tested over a Tryton server and core modules
|
|||
patched with patches from `trytond-patches project`_ (take care with the
|
||||
branches). Maybe these patches are required for the module to work.
|
||||
|
||||
.. _trytond-patches project: https://bitbucket.org/nantic/trytond-patches
|
||||
.. _trytond-patches project: https://github.com/NaN-tic/trytond-patches
|
||||
|
||||
Installing
|
||||
----------
|
||||
|
|
35
setup.py
35
setup.py
|
@ -4,6 +4,7 @@
|
|||
from setuptools import setup
|
||||
import re
|
||||
import os
|
||||
import io
|
||||
from configparser import ConfigParser
|
||||
|
||||
MODULE = 'account_invoice_intercompany'
|
||||
|
@ -15,7 +16,9 @@ MODULE2PREFIX = {
|
|||
|
||||
|
||||
def read(fname):
|
||||
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
||||
return io.open(
|
||||
os.path.join(os.path.dirname(__file__), fname),
|
||||
'r', encoding='utf-8').read()
|
||||
|
||||
|
||||
def get_require_version(name):
|
||||
|
@ -43,12 +46,33 @@ requires = []
|
|||
for dep in info.get('depends', []):
|
||||
if not re.match(r'(ir|res|webdav)(\W|$)', dep):
|
||||
prefix = MODULE2PREFIX.get(dep, 'trytond')
|
||||
requires.append('%s_%s >= %s.%s, < %s.%s' %
|
||||
(prefix, dep, major_version, minor_version,
|
||||
major_version, minor_version + 1))
|
||||
requires.append(get_require_version('%s_%s' % (prefix, dep)))
|
||||
requires.append(get_require_version('trytond'))
|
||||
|
||||
tests_require = [get_require_version('proteus')]
|
||||
series = '%s.%s' % (major_version, minor_version)
|
||||
if minor_version % 2:
|
||||
branch = 'default'
|
||||
else:
|
||||
branch = series
|
||||
dependency_links = [
|
||||
('git+https://github.com/NaN-tic/'
|
||||
'trytond-company_account_sync@%(branch)s'
|
||||
'#egg=nantic-company_account_sync-%(series)s' % {
|
||||
'branch': branch,
|
||||
'series': series,
|
||||
}),
|
||||
('git+https://github.com/NaN-tic/'
|
||||
'trytond-company_user@%(branch)s'
|
||||
'#egg=nantic-company_user-%(series)s' % {
|
||||
'branch': branch,
|
||||
'series': series,
|
||||
}),
|
||||
|
||||
]
|
||||
if minor_version % 2:
|
||||
# Add development index for testing with proteus
|
||||
dependency_links.append('https://trydevpi.tryton.org/')
|
||||
|
||||
setup(name='%s_%s' % (PREFIX, MODULE),
|
||||
version=version,
|
||||
|
@ -57,7 +81,7 @@ setup(name='%s_%s' % (PREFIX, MODULE),
|
|||
author='NaN·tic',
|
||||
author_email='info@nan-tic.com',
|
||||
url='http://www.nan-tic.com/',
|
||||
download_url="https://bitbucket.org/nantic/trytond-%s" % MODULE,
|
||||
download_url="https://github.com/NaN-tic/trytond-%s" % MODULE,
|
||||
package_dir={'trytond.modules.%s' % MODULE: '.'},
|
||||
packages=[
|
||||
'trytond.modules.%s' % MODULE,
|
||||
|
@ -91,6 +115,7 @@ setup(name='%s_%s' % (PREFIX, MODULE),
|
|||
],
|
||||
license='GPL-3',
|
||||
install_requires=requires,
|
||||
dependency_links=dependency_links,
|
||||
zip_safe=False,
|
||||
entry_points="""
|
||||
[trytond.modules]
|
||||
|
|
Loading…
Reference in New Issue