"Fix egg on dependency links [SKIP CI]."

This commit is contained in:
Sergio Morillo 2021-01-20 01:04:48 +01:00
parent f643ba87aa
commit cacbfd33d5
4 changed files with 14 additions and 41 deletions

View File

@ -7,7 +7,6 @@ pipeline:
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- python tests/netrc2hgrc.py
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
@ -42,4 +41,10 @@ matrix:
DATABASE: sqlite
- IMAGE: python:3.7
TOXENV: py37
DATABASE: postgresql
- IMAGE: python:3.8
TOXENV: py38
DATABASE: sqlite
- IMAGE: python:3.8
TOXENV: py38
DATABASE: postgresql

View File

@ -55,37 +55,32 @@ dependency_links = {
'incoterm':
'git+https://gitlab.com/datalifeit/'
'trytond-incoterm@%(branch)s'
'#egg=datalife_incoterm-%(series)s' % {
'#egg=datalife_incoterm' % {
'branch': branch,
'series': series,
},
'stock_unit_load':
'git+https://gitlab.com/datalifeit/'
'trytond-stock_unit_load@%(branch)s'
'#egg=datalife_stock_unit_load-%(series)s' % {
'#egg=datalife_stock_unit_load' % {
'branch': branch,
'series': series,
},
'product_ean':
'git+https://gitlab.com/datalifeit/'
'trytond-product_ean@%(branch)s'
'#egg=datalife_product_ean-%(series)s' % {
'#egg=datalife_product_ean' % {
'branch': branch,
'series': series,
},
'product_cross_reference':
'git+https://gitlab.com/datalifeit/'
'trytond-product_cross_reference@%(branch)s'
'#egg=datalife_product_cross_reference-%(series)s' % {
'#egg=datalife_product_cross_reference' % {
'branch': branch,
'series': series,
},
'party_edi':
'git+https://gitlab.com/datalifeit/'
'trytond-party_edi@%(branch)s'
'#egg=nantic_party_edi-%(series)s' % {
'#egg=nantic_party_edi' % {
'branch': branch,
'series': series,
},
}

View File

@ -1,27 +0,0 @@
import netrc
import os
try:
from configparser import ConfigParser, DuplicateSectionError
except ImportError:
from ConfigParser import ConfigParser, DuplicateSectionError
def main():
netrc_ = netrc.netrc(os.path.expanduser('~/.netrc'))
config = ConfigParser()
try:
config.add_section('auth')
except DuplicateSectionError:
pass
hgrc = os.path.expanduser('~/.hgrc')
config.read(hgrc)
for host, (login, _, password) in netrc_.hosts.items():
config.set('auth', host + '.prefix', host)
config.set('auth', host + '.username', login)
config.set('auth', host + '.password', password)
with open(hgrc, 'w') as fp:
config.write(fp)
if __name__ == '__main__':
main()

View File

@ -1,10 +1,10 @@
[tox]
envlist = {py36,py37}-{sqlite,postgresql},pypy3-{sqlite,postgresql}
envlist = {py36,py37,py38}-{sqlite,postgresql},pypy3-{sqlite,postgresql}
[testenv]
commands = {envpython} setup.py test
deps =
{py36,py37}-postgresql: psycopg2 >= 2.5
{py36,py37,py38}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
{py36}-sqlite: sqlitebck
setenv =
@ -12,4 +12,4 @@ setenv =
postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://}
sqlite: DB_NAME={env:SQLITE_NAME::memory:}
postgresql: DB_NAME={env:POSTGRESQL_NAME:test}
install_command = pip install --pre {opts} {packages}
install_command = pip install --pre {opts} {packages}