changeset 956e836dc061 in tryton:5.6 details: https://hg.tryton.org/tryton?cmd=changeset;node=956e836dc061 description: Add support for local_version on trydevpi.tryton.org
issue9928 diffstat: .drone.yml | 3 +++ setup.py | 19 ++++++++++++++++--- tox.ini | 2 +- 3 files changed, 20 insertions(+), 4 deletions(-) diffs (61 lines): diff -r 0d0466ebc882 -r 956e836dc061 .drone.yml --- a/.drone.yml Wed Dec 02 19:21:38 2020 +0100 +++ b/.drone.yml Fri Dec 11 15:44:43 2020 +0100 @@ -9,6 +9,9 @@ pipeline: tox: image: ${IMAGE} + environment: + - CFLAGS=-O0 + - TOX_TESTENV_PASSENV=CFLAGS CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID commands: - pip install tox - tox -e "${TOXENV}" diff -r 0d0466ebc882 -r 956e836dc061 setup.py --- a/setup.py Wed Dec 02 19:21:38 2020 +0100 +++ b/setup.py Fri Dec 11 15:44:43 2020 +0100 @@ -74,12 +74,24 @@ download_url = 'hg+http://hg.tryton.org/%s#egg=%s-%s' % ( name, name, version) local_version = [] -for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER', 'CI_JOB_ID']: - if os.environ.get(build): - local_version.append(os.environ[build]) +if os.environ.get('CI_JOB_ID'): + local_version.append(os.environ['CI_JOB_ID']) +else: + for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: + if os.environ.get(build): + local_version.append(os.environ[build]) + else: + local_version = [] + break if local_version: version += '+' + '.'.join(local_version) +dependency_links = [] +if minor_version % 2: + dependency_links.append( + 'https://trydevpi.tryton.org/?local_version=' + + '.'.join(local_version)) + dist = setup(name=name, version=version, description='Tryton desktop client', @@ -144,6 +156,7 @@ extras_require={ 'calendar': ['GooCalendar>=0.7'], }, + dependency_links=dependency_links, zip_safe=False, test_suite='tryton.tests', **args diff -r 0d0466ebc882 -r 956e836dc061 tox.ini --- a/tox.ini Wed Dec 02 19:21:38 2020 +0100 +++ b/tox.ini Fri Dec 11 15:44:43 2020 +0100 @@ -3,4 +3,4 @@ [testenv] commands = {envpython} setup.py test -install_command = pip install --pre --find-links https://trydevpi.tryton.org/ {opts} {packages} +install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}} {opts} {packages}