Prepare migration to monorepo

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier
2022-12-17 17:14:49 +01:00
parent 8b71e72354
commit 7c275d29fb
842 changed files with 10950 additions and 16094 deletions
View File
+30
View File
@@ -0,0 +1,30 @@
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "trigger"
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_BRANCH =~ /^branch\/.*/
stages:
- preparation
- execution
prepare-job:
stage: preparation
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/tryton/ci
script:
- python .gitlab-scripts/generate-ci.py gitlab-generated-ci.yml
artifacts:
paths:
- gitlab-generated-ci.yml
trigger-job:
stage: execution
trigger:
forward:
pipeline_variables: true
strategy: depend
include:
- artifact: gitlab-generated-ci.yml
job: prepare-job
+169
View File
@@ -0,0 +1,169 @@
#!/bin/env python
import glob
import os
import subprocess
import sys
from itertools import chain
from string import Template
BASE_DIR = os.path.dirname(__file__)
TEMPLATE_DOC = Template("""
check-doc-${name}:
extends: .check-doc
variables:
PACKAGE: ${package}
trigger-doc-build-${name}:
extends: .trigger-doc-build
variables:
PACKAGE: ${package}
""")
TEMPLATE = Template("""
test-${name}:
extends: .test-tox
variables:
PACKAGE: ${package}
${stage}
${when}
""")
TEMPLATE_IMAGE = Template("""
test-${name}:
extends: .test-tox
image: $${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/tryton/${package}-test:$${PYTHON_VERSION}
variables:
PACKAGE: ${package}
${stage}
${when}
""") # noqa: E501
TEMPLATE_DB = Template("""
test-${name}-sqlite:
extends: .test-sqlite
variables:
PACKAGE: ${package}
${stage}
${when}
test-${name}-postgresql:
extends: .test-postgresql
variables:
PACKAGE: ${package}
${stage}
${when}
""")
TEMPLATE_GIS = Template("""
test-${name}-postgis:
extends: .test-postgis
variables:
PACKAGE: ${package}
${stage}
${when}
""")
TEMPLATE_NPM_IMAGE = Template("""
test-${name}:
extends: .test-npm
image: $${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/tryton/${package}-test
variables:
PACKAGE: ${package}
${stage}
${when}
""")
STAGE_MANUAL = "stage: manual"
WHEN_MANUAL = """
allow_failure: true
rules:
- when: manual
"""
NO_DB = {'proteus'}
CUSTOM_IMAGE = {'tryton'}
CUSTOM_NPM_IMAGE = {'sao'}
GIS = {'trytond-gis'}
def main(filename):
if filename == '-':
render(sys.stdout)
else:
with open(filename, 'w') as file:
render(file)
def render(file):
file.write(open(os.path.join(BASE_DIR, 'gitlab-ci.yml'), 'r').read())
packages = list(all_packages())
modified = set(modified_packages(packages))
for package in packages:
mapping = {
'name': package.replace('/', '-'),
'package': package,
'stage': STAGE_MANUAL if package not in modified else '',
'when': WHEN_MANUAL if package not in modified else '',
}
if os.path.exists(os.path.join(package, 'doc')):
file.write(TEMPLATE_DOC.substitute(mapping))
if package in NO_DB:
file.write(TEMPLATE.substitute(mapping))
elif package in CUSTOM_IMAGE:
file.write(TEMPLATE_IMAGE.substitute(mapping))
elif package in CUSTOM_NPM_IMAGE:
file.write(TEMPLATE_NPM_IMAGE.substitute(mapping))
elif package in GIS:
file.write(TEMPLATE_GIS.substitute(mapping))
else:
file.write(TEMPLATE_DB.substitute(mapping))
def all_packages():
root_dir = os.path.dirname(BASE_DIR)
for filename in chain(
glob.glob('**/setup.py', recursive=True, root_dir=root_dir),
glob.glob('**/package.json', recursive=True, root_dir=root_dir)):
yield os.path.dirname(filename)
def modified_packages(packages):
env = os.environ.copy()
env['HGPLAIN'] = '1'
if env.get('CI_COMMIT_TAG'):
tagged = env['CI_COMMIT_TAG'].split('-')[0]
for package in packages:
if tagged in package:
yield package
else:
if not subprocess.run(
['hg', 'topic', '--current'],
env=env, stdout=subprocess.DEVNULL).returncode:
cmd = ['hg', 'status', '--rev', 's0', '--no-status']
else:
cmd = ['hg', 'status', '--change', '.', '--no-status']
proc = subprocess.run(cmd, env=env, stdout=subprocess.PIPE, text=True)
proc.check_returncode()
modified_files = proc.stdout.splitlines()
modified = set()
for filename in modified_files:
parts = filename.split(os.sep)
modified.add(parts[0])
modified.add(os.sep.join(parts[:2]))
for package in packages:
if package in modified:
yield package
if __name__ == '__main__':
try:
filename = sys.argv[1]
except IndexError:
filename = '-'
main(filename)
+24
View File
@@ -0,0 +1,24 @@
#!/bin/sh
set -eu
OUTPUTDIR=`realpath "${1}"`
mkdir -p "${OUTPUTDIR}"
find . -path '*/doc/conf.py' | while read path; do
path=`dirname "${path}"`
path=`dirname "${path}"`
package=`basename "${path}"`
package=$(echo ${package} | sed "s/_/-/g")
if [ "${package}" = "trytond" ]; then
package="server"
elif [ "${package}" = "tryton" ]; then
package="client-desktop"
elif [ "${package}" = "proteus" ]; then
package="client-library"
elif [ "${package}" = "trytond-gis" ]; then
package="backend-gis"
else
package="modules-${package}"
fi
(cd "${path}" && python -m sphinx -T -E -b html doc "${OUTPUTDIR}/${package}")
done
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
set -eu
PACKAGES=`realpath "${1}"`
mkdir -p "${PACKAGES}"
find . -name setup.py | while read path; do
(cd "`dirname ${path}`" && python setup.py sdist && cp dist/* "${PACKAGES}")
done
+169
View File
@@ -0,0 +1,169 @@
stages:
- preparation
- check
- test
- build
- manual
packages:
stage: preparation
rules:
- when: always
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/tryton/ci
variables:
DOC_BASE_URL: ${CI_PROJECT_DIR}/docs
script:
- .gitlab-scripts/generate-packages.sh packages
artifacts:
paths:
- packages/
expire_in: 1 week
documentation:
stage: preparation
rules:
- when: always
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/sphinxdoc/sphinx
script:
- .gitlab-scripts/generate-doc.sh docs
artifacts:
paths:
- docs/
expire_in: 1 week
.check:
stage: check
rules:
- if: $CI_MERGE_REQUEST_ID != null
when: always
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/tryton/ci
.check-doc:
extends: .check
needs:
- documentation
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/sphinxdoc/sphinx
variables:
DOC_BASE_URL: ${CI_PROJECT_DIR}/docs
DOC_DIR: doc
script:
- cd "${PACKAGE}"
- python -m sphinx -T -E -W -n -b html ${DOC_DIR} _build/html
- python -m sphinx -T -E -W -n -b linkcheck ${DOC_DIR} _build
rules:
- changes:
- ${PACKAGE}/${DOC_DIR}/**/*
- ${PACKAGE}/tryton.cfg
- ${PACKAGE}/CHANGELOG
check-doc-readthedocs:
extends: .check-doc
variables:
PACKAGE: readthedocs
DOC_DIR: .
rules:
- changes:
- ${PACKAGE}/**/*
check-flake8:
extends: .check
script:
- hg diff --rev s0 | flake8 --diff
check-dist:
stage: check
needs:
- packages
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/tryton/ci
script:
- twine check packages/*
.test:
stage: test
rules:
- when: always
.test-tox:
extends: .test
needs:
- packages
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/python:${PYTHON_VERSION}
variables:
CFLAGS: -O0
PIP_FIND_LINKS: file://${CI_PROJECT_DIR}/packages/
before_script:
- pip install tox
script:
- tox -e "py${PYTHON_VERSION/./}" -c "${PACKAGE}"
parallel:
matrix:
- PYTHON_VERSION: ["3.6", "3.7", "3.8", "3.9"]
.test-db:
extends: .test-tox
variables:
DB_CACHE: /tmp/cache
script:
- tox -e "py${PYTHON_VERSION/./}-${DATABASE}" -c "${PACKAGE}"
.test-sqlite:
extends: .test-db
variables:
DATABASE: sqlite
.test-postgresql:
extends: .test-db
variables:
DATABASE: postgresql
POSTGRESQL_URI: postgresql://postgres@postgresql:5432/
POSTGRES_HOST_AUTH_METHOD: trust
services:
- name: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/postgres
alias: postgresql
command: ["-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
.test-postgis:
extends: .test-db
variables:
DATABASE: postgis
POSTGIS_URI: postgis://postgres@postgis:5432/
POSTGRES_HOST_AUTH_METHOD: trust
script:
- tox -e "py${PYTHON_VERSION/./}" -c "${PACKAGE}"
services:
- name: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/postgis/postgis
alias: postgis
command: ["-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
.test-npm:
extends: .test
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/node
before_script:
- sh .gitlab-scripts/bower_allow_root.sh
script:
- cd "${PACKAGE}"
- npm -s install --unsafe-perm --legacy-peer-deps
- npm test
.trigger-doc-build:
stage: build
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/tryton/ci
script:
- .gitlab-scripts/trigger-readthedocs.py -c "${RTD_CONFIG}" -p "${PACKAGE}" -b "${CI_COMMIT_BRANCH#branch/}"
rules:
- if: $CI_COMMIT_BRANCH =~ /^branch\/.*/
changes:
- ${PACKAGE}/doc/**/*
- ${PACKAGE}/tryton.cfg
- ${PACKAGE}/CHANGELOG
allow_failure: true
trigger-doc-build-readthedocs:
extends: .trigger-doc-build
variables:
PACKAGE: readthedocs
rules:
- if: $CI_COMMIT_BRANCH =~ /^branch\/.*/
changes:
- ${PACKAGE}/**/*
allow_failure: true
+45
View File
@@ -0,0 +1,45 @@
#!/usr/bin/env python
#
# Requires $RTD_CONFIG to point to a file providing the webhook data for each
# package. The file is in Python cfg file format.
# Each section defines on package. Example::
#
# [modules/party]
# url: https://readthedocs.org/api/v2/webhook/modules-party/12345/
# token: 93afe1ce2d1107597f69774009964990c0643dad
import configparser
import sys
from argparse import ArgumentParser
from urllib import request
from urllib.parse import urlencode
parser = ArgumentParser()
parser.add_argument('--config', '-c', required=True)
parser.add_argument('--package', '-p', required=True)
parser.add_argument('--branches', '-b', nargs='*')
args = parser.parse_args()
cfg = configparser.ConfigParser()
cfg.read(args.config)
url = cfg.get(args.package, 'url')
token = cfg.get(args.package, 'token')
if not url:
sys.exit(f"Missing url for {args.package!r}")
elif not token:
sys.exit(f"Missing token for {args.package!r}")
data = [
('token', token),
*(('branches', branch) for branch in args.branches),
]
req = request.Request(
url,
data=urlencode(data).encode(),
headers={
'User-Agent': 'python-urllib/%s' % request.__version__,
})
with request.urlopen(req) as resp:
print(resp.read())
+12
View File
@@ -0,0 +1,12 @@
syntax: glob
*.py[cdo]
*.egg-info
dist/
build/
node_modules/
bower_components/
.tox/
requirements.txt
requirements-dev.txt
.hgignore-modules
include:.hgignore-modules
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env python
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import glob
import io
import os
root = os.path.dirname(os.path.dirname(__file__))
source = os.path.join(root, 'modules')
destination = os.path.join(root, 'trytond', 'trytond', 'modules')
modules = set()
for filename in glob.glob('modules/*/setup.py', root_dir=root):
modules.add(os.path.basename(os.path.dirname(filename)))
for module in modules:
path = os.path.join(destination, module)
if not os.path.exists(path):
os.symlink(
os.path.relpath(os.path.join(source, module), destination), path)
for module in os.listdir(destination):
path = os.path.join(destination, module)
if os.path.islink(path) and module not in modules:
os.unlink(path)
with io.open(os.path.join(root, '.hgignore-modules'), 'w') as fp:
for module in modules:
fp.write(os.path.join('trytond', 'modules', module) + '\n')
+79
View File
@@ -0,0 +1,79 @@
#!/usr/bin/env python
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import io
import os
import subprocess
from multiprocessing.dummy import Pool
root = os.path.dirname(os.path.dirname(__file__))
module_path = os.path.join(root, 'modules')
dependencies = set()
development_dependencies = set()
FNULL = open(os.devnull, 'w')
def add_dependencies(package, path):
egg_info_name = '%s.egg-info' % package
egg_info = os.path.join(path, egg_info_name)
if (not os.path.isdir(egg_info)
or (os.path.getmtime(os.path.join(path, 'setup.py'))
> os.path.getmtime(os.path.join(egg_info, 'requires.txt')))
or (os.path.exists(os.path.join(path, 'tryton.cfg'))
and os.path.getmtime(os.path.join(path, 'tryton.cfg'))
> os.path.getmtime(os.path.join(egg_info, 'requires.txt')))):
subprocess.call(
['./setup.py', 'egg_info'],
cwd=path,
stdout=FNULL,
stderr=FNULL)
with io.open(os.path.join(egg_info, 'requires.txt')) as f:
development = False
for dependency in f.readlines():
dependency = dependency.strip('\n')
# Do not include trytond requirements as we have its source code
if (not dependency
or dependency.startswith('trytond')
or dependency.startswith('proteus')):
continue
# Always include optional dependencies as development
if dependency[0].startswith('['):
development = True
continue
# Remove version numbers
for char in ['>', '<', '=']:
dependency = dependency.split(char)[0]
if development:
development_dependencies.add(dependency)
else:
dependencies.add(dependency)
pool = Pool()
pool.apply_async(add_dependencies,
('trytond', os.path.join(root, 'trytond')))
pool.apply_async(add_dependencies,
('tryton', os.path.join(root, 'tryton')))
pool.apply_async(add_dependencies,
('proteus', os.path.join(root, 'proteus')))
pool.apply_async(add_dependencies,
('trytond_gis', os.path.join(root, 'trytond-gis')))
for module in os.listdir(module_path):
path = os.path.join(module_path, module)
if not os.path.isdir(path):
continue
pool.apply_async(
add_dependencies, ('trytond_%s' % module, path))
pool.close()
pool.join()
with io.open(os.path.join(root, 'requirements.txt'), 'w') as fp:
fp.writelines(map(lambda d: d + '\n', sorted(dependencies)))
with io.open(os.path.join(root, 'requirements-dev.txt'), 'w') as fp:
fp.writelines(map(lambda d: d + '\n', sorted(development_dependencies)))
+23
View File
@@ -0,0 +1,23 @@
This repository contains all the packages of Tryton.
To have symlinks for modules created automatically on Mercurial update, add
the following line to the hooks section of your .hg/hgrc:
update.modules = .hooks/link_modules
To automatically generate requirements files on Mercurial update, add
the following line to the hooks section of your .hg/hgrc:
update.requirements = .hooks/update_requirements
.. warning::
The process of updating requirements files may take some time
Then you can install the required dependencies with:
pip install -r requirements.txt
And you can also install the development dependencies with:
pip install -r requirements-dev.txt
-68
View File
@@ -1,68 +0,0 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
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
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
+12 -4
View File
@@ -1,13 +1,20 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/'
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
import os
base_url = os.environ.get('DOC_BASE_URL')
if base_url:
modules_url = base_url + '/modules-{module}/'
trytond_url = base_url + '/server/'
else:
modules_url = (
'https://docs.tryton.org/projects/modules-{module}/en/{series}/')
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
def get_info():
import configparser
import os
import subprocess
import sys
@@ -57,5 +64,6 @@ intersphinx_mapping.update({
module=m.replace('_', '-'), series=version), None)
for m in info['modules']
})
linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*']
del get_info, info, modules_url, trytond_url
del get_info, info, base_url, modules_url, trytond_url
-23
View File
@@ -42,23 +42,6 @@ name = 'trytond_account'
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/modules/%s#egg=%s-%s' % (
name[8:], name, version))
local_version = []
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)
requires = ['python-dateutil', 'python-sql >= 0.7', 'simpleeval']
for dep in info.get('depends', []):
@@ -67,11 +50,6 @@ for dep in info.get('depends', []):
requires.append(get_require_version('trytond'))
tests_require = [get_require_version('proteus')]
dependency_links = []
if minor_version % 2:
dependency_links.append(
'https://trydevpi.tryton.org/?local_version='
+ '.'.join(local_version))
setup(name=name,
version=version,
@@ -141,7 +119,6 @@ setup(name=name,
license='GPL-3',
python_requires='>=3.6',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
+3 -3
View File
@@ -7,9 +7,9 @@ deps =
{py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
py36-sqlite: sqlitebck
passenv = *
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
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 --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}} {opts} {packages}
sqlite: DB_NAME={env:DB_NAME::memory:}
postgresql: DB_NAME={env:DB_NAME:test}
-68
View File
@@ -1,68 +0,0 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
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
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
-2
View File
@@ -1,2 +0,0 @@
[flake8]
ignore=E123,E124,E126,E128,E741,W503
+69
View File
@@ -0,0 +1,69 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import os
base_url = os.environ.get('DOC_BASE_URL')
if base_url:
modules_url = base_url + '/modules-{module}/'
trytond_url = base_url + '/server/'
else:
modules_url = (
'https://docs.tryton.org/projects/modules-{module}/en/{series}/')
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
def get_info():
import configparser
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
config = configparser.ConfigParser()
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'] = result.stdout.decode('utf-8').strip()
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
if 'dev' in version:
info['series'] = 'latest'
else:
info['series'] = '.'.join(version.split('.', 2)[:2])
for key in {'depends', 'extras_depend'}:
info[key] = info.get(key, '').strip().splitlines()
info['modules'] = set(info['depends'] + info['extras_depend'])
info['modules'] -= {'ir', 'res'}
return info
info = get_info()
master_doc = 'index'
project = info['name']
release = version = info['series']
default_role = 'ref'
highlight_language = 'none'
extensions = [
'sphinx.ext.intersphinx',
]
intersphinx_mapping = {
'trytond': (trytond_url.format(series=version), None),
}
intersphinx_mapping.update({
m: (modules_url.format(
module=m.replace('_', '-'), series=version), None)
for m in info['modules']
})
linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*']
del get_info, info, base_url, modules_url, trytond_url
-24
View File
@@ -39,23 +39,6 @@ name = 'trytond_account_asset'
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/modules/%s#egg=%s-%s' % (
name[8:], name, version))
local_version = []
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)
requires = ['python-dateutil']
for dep in info.get('depends', []):
@@ -65,12 +48,6 @@ requires.append(get_require_version('trytond'))
tests_require = [get_require_version('proteus'),
get_require_version('trytond_purchase')]
dependency_links = []
if minor_version % 2:
dependency_links.append(
'https://trydevpi.tryton.org/?local_version='
+ '.'.join(local_version))
setup(name=name,
version=version,
@@ -140,7 +117,6 @@ setup(name=name,
license='GPL-3',
python_requires='>=3.6',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
+3 -3
View File
@@ -7,9 +7,9 @@ deps =
{py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
py36-sqlite: sqlitebck
passenv = *
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
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 --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}} {opts} {packages}
sqlite: DB_NAME={env:DB_NAME::memory:}
postgresql: DB_NAME={env:DB_NAME:test}
-68
View File
@@ -1,68 +0,0 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
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
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
-2
View File
@@ -1,2 +0,0 @@
[flake8]
ignore=E123,E124,E126,E128,E741,W503
+69
View File
@@ -0,0 +1,69 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import os
base_url = os.environ.get('DOC_BASE_URL')
if base_url:
modules_url = base_url + '/modules-{module}/'
trytond_url = base_url + '/server/'
else:
modules_url = (
'https://docs.tryton.org/projects/modules-{module}/en/{series}/')
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
def get_info():
import configparser
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
config = configparser.ConfigParser()
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'] = result.stdout.decode('utf-8').strip()
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
if 'dev' in version:
info['series'] = 'latest'
else:
info['series'] = '.'.join(version.split('.', 2)[:2])
for key in {'depends', 'extras_depend'}:
info[key] = info.get(key, '').strip().splitlines()
info['modules'] = set(info['depends'] + info['extras_depend'])
info['modules'] -= {'ir', 'res'}
return info
info = get_info()
master_doc = 'index'
project = info['name']
release = version = info['series']
default_role = 'ref'
highlight_language = 'none'
extensions = [
'sphinx.ext.intersphinx',
]
intersphinx_mapping = {
'trytond': (trytond_url.format(series=version), None),
}
intersphinx_mapping.update({
m: (modules_url.format(
module=m.replace('_', '-'), series=version), None)
for m in info['modules']
})
linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*']
del get_info, info, base_url, modules_url, trytond_url
-24
View File
@@ -39,23 +39,6 @@ name = 'trytond_account_be'
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/modules/%s#egg=%s-%s' % (
name[8:], name, version))
local_version = []
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)
requires = []
for dep in info.get('depends', []):
@@ -63,12 +46,6 @@ for dep in info.get('depends', []):
requires.append(get_require_version('trytond_%s' % dep))
requires.append(get_require_version('trytond'))
dependency_links = []
if minor_version % 2:
dependency_links.append(
'https://trydevpi.tryton.org/?local_version='
+ '.'.join(local_version))
setup(name=name,
version=version,
description='Tryton module with Belgian chart of accounts',
@@ -118,7 +95,6 @@ setup(name=name,
license='GPL-3',
python_requires='>=3.6',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
+3 -3
View File
@@ -7,9 +7,9 @@ deps =
{py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
py36-sqlite: sqlitebck
passenv = *
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
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 --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}} {opts} {packages}
sqlite: DB_NAME={env:DB_NAME::memory:}
postgresql: DB_NAME={env:DB_NAME:test}
-68
View File
@@ -1,68 +0,0 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
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
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
-2
View File
@@ -1,2 +0,0 @@
[flake8]
ignore=E123,E124,E126,E128,E741,W503
+69
View File
@@ -0,0 +1,69 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import os
base_url = os.environ.get('DOC_BASE_URL')
if base_url:
modules_url = base_url + '/modules-{module}/'
trytond_url = base_url + '/server/'
else:
modules_url = (
'https://docs.tryton.org/projects/modules-{module}/en/{series}/')
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
def get_info():
import configparser
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
config = configparser.ConfigParser()
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'] = result.stdout.decode('utf-8').strip()
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
if 'dev' in version:
info['series'] = 'latest'
else:
info['series'] = '.'.join(version.split('.', 2)[:2])
for key in {'depends', 'extras_depend'}:
info[key] = info.get(key, '').strip().splitlines()
info['modules'] = set(info['depends'] + info['extras_depend'])
info['modules'] -= {'ir', 'res'}
return info
info = get_info()
master_doc = 'index'
project = info['name']
release = version = info['series']
default_role = 'ref'
highlight_language = 'none'
extensions = [
'sphinx.ext.intersphinx',
]
intersphinx_mapping = {
'trytond': (trytond_url.format(series=version), None),
}
intersphinx_mapping.update({
m: (modules_url.format(
module=m.replace('_', '-'), series=version), None)
for m in info['modules']
})
linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*']
del get_info, info, base_url, modules_url, trytond_url
-23
View File
@@ -42,23 +42,6 @@ name = 'trytond_account_cash_rounding'
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/modules/%s#egg=%s-%s' % (
name[8:], name, version))
local_version = []
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)
requires = []
for dep in info.get('depends', []):
@@ -69,11 +52,6 @@ requires.append(get_require_version('trytond'))
tests_require = [get_require_version('proteus')]
for extra in info.get('extras_depend', []):
tests_require.append(get_require_version('trytond_%s' % extra))
dependency_links = []
if minor_version % 2:
dependency_links.append(
'https://trydevpi.tryton.org/?local_version='
+ '.'.join(local_version))
setup(name=name,
version=version,
@@ -144,7 +122,6 @@ setup(name=name,
license='GPL-3',
python_requires='>=3.6',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
+3 -3
View File
@@ -7,9 +7,9 @@ deps =
{py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
py36-sqlite: sqlitebck
passenv = *
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
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 --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}} {opts} {packages}
sqlite: DB_NAME={env:DB_NAME::memory:}
postgresql: DB_NAME={env:DB_NAME:test}
-68
View File
@@ -1,68 +0,0 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
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
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
-2
View File
@@ -1,2 +0,0 @@
[flake8]
ignore=E123,E124,E126,E128,E741,W503
+69
View File
@@ -0,0 +1,69 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import os
base_url = os.environ.get('DOC_BASE_URL')
if base_url:
modules_url = base_url + '/modules-{module}/'
trytond_url = base_url + '/server/'
else:
modules_url = (
'https://docs.tryton.org/projects/modules-{module}/en/{series}/')
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
def get_info():
import configparser
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
config = configparser.ConfigParser()
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'] = result.stdout.decode('utf-8').strip()
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
if 'dev' in version:
info['series'] = 'latest'
else:
info['series'] = '.'.join(version.split('.', 2)[:2])
for key in {'depends', 'extras_depend'}:
info[key] = info.get(key, '').strip().splitlines()
info['modules'] = set(info['depends'] + info['extras_depend'])
info['modules'] -= {'ir', 'res'}
return info
info = get_info()
master_doc = 'index'
project = info['name']
release = version = info['series']
default_role = 'ref'
highlight_language = 'none'
extensions = [
'sphinx.ext.intersphinx',
]
intersphinx_mapping = {
'trytond': (trytond_url.format(series=version), None),
}
intersphinx_mapping.update({
m: (modules_url.format(
module=m.replace('_', '-'), series=version), None)
for m in info['modules']
})
linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*']
del get_info, info, base_url, modules_url, trytond_url
-23
View File
@@ -39,23 +39,6 @@ name = 'trytond_account_credit_limit'
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/modules/%s#egg=%s-%s' % (
name[8:], name, version))
local_version = []
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)
requires = []
for dep in info.get('depends', []):
@@ -64,11 +47,6 @@ for dep in info.get('depends', []):
requires.append(get_require_version('trytond'))
tests_require = [get_require_version('trytond_account_dunning')]
dependency_links = []
if minor_version % 2:
dependency_links.append(
'https://trydevpi.tryton.org/?local_version='
+ '.'.join(local_version))
setup(name=name,
version=version,
@@ -138,7 +116,6 @@ setup(name=name,
license='GPL-3',
python_requires='>=3.6',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
+3 -3
View File
@@ -7,9 +7,9 @@ deps =
{py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
py36-sqlite: sqlitebck
passenv = *
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
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 --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}} {opts} {packages}
sqlite: DB_NAME={env:DB_NAME::memory:}
postgresql: DB_NAME={env:DB_NAME:test}
-68
View File
@@ -1,68 +0,0 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
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
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
-2
View File
@@ -1,2 +0,0 @@
[flake8]
ignore=E123,E124,E126,E128,E741,W503
+69
View File
@@ -0,0 +1,69 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import os
base_url = os.environ.get('DOC_BASE_URL')
if base_url:
modules_url = base_url + '/modules-{module}/'
trytond_url = base_url + '/server/'
else:
modules_url = (
'https://docs.tryton.org/projects/modules-{module}/en/{series}/')
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
def get_info():
import configparser
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
config = configparser.ConfigParser()
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'] = result.stdout.decode('utf-8').strip()
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
if 'dev' in version:
info['series'] = 'latest'
else:
info['series'] = '.'.join(version.split('.', 2)[:2])
for key in {'depends', 'extras_depend'}:
info[key] = info.get(key, '').strip().splitlines()
info['modules'] = set(info['depends'] + info['extras_depend'])
info['modules'] -= {'ir', 'res'}
return info
info = get_info()
master_doc = 'index'
project = info['name']
release = version = info['series']
default_role = 'ref'
highlight_language = 'none'
extensions = [
'sphinx.ext.intersphinx',
]
intersphinx_mapping = {
'trytond': (trytond_url.format(series=version), None),
}
intersphinx_mapping.update({
m: (modules_url.format(
module=m.replace('_', '-'), series=version), None)
for m in info['modules']
})
linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*']
del get_info, info, base_url, modules_url, trytond_url
-24
View File
@@ -39,23 +39,6 @@ name = 'trytond_account_de_skr03'
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/modules/%s#egg=%s-%s' % (
name[8:], name, version))
local_version = []
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)
requires = []
for dep in info.get('depends', []):
@@ -63,12 +46,6 @@ for dep in info.get('depends', []):
requires.append(get_require_version('trytond_%s' % dep))
requires.append(get_require_version('trytond'))
dependency_links = []
if minor_version % 2:
dependency_links.append(
'https://trydevpi.tryton.org/?local_version='
+ '.'.join(local_version))
setup(name=name,
version=version,
description='Tryton module with German chart of accounts SKR03',
@@ -117,7 +94,6 @@ setup(name=name,
license='GPL-3',
python_requires='>=3.6',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
+3 -3
View File
@@ -7,9 +7,9 @@ deps =
{py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
py36-sqlite: sqlitebck
passenv = *
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
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 --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}} {opts} {packages}
sqlite: DB_NAME={env:DB_NAME::memory:}
postgresql: DB_NAME={env:DB_NAME:test}
-68
View File
@@ -1,68 +0,0 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
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
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
-2
View File
@@ -1,2 +0,0 @@
[flake8]
ignore=E123,E124,E126,E128,E741,W503
+69
View File
@@ -0,0 +1,69 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import os
base_url = os.environ.get('DOC_BASE_URL')
if base_url:
modules_url = base_url + '/modules-{module}/'
trytond_url = base_url + '/server/'
else:
modules_url = (
'https://docs.tryton.org/projects/modules-{module}/en/{series}/')
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
def get_info():
import configparser
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
config = configparser.ConfigParser()
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'] = result.stdout.decode('utf-8').strip()
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
if 'dev' in version:
info['series'] = 'latest'
else:
info['series'] = '.'.join(version.split('.', 2)[:2])
for key in {'depends', 'extras_depend'}:
info[key] = info.get(key, '').strip().splitlines()
info['modules'] = set(info['depends'] + info['extras_depend'])
info['modules'] -= {'ir', 'res'}
return info
info = get_info()
master_doc = 'index'
project = info['name']
release = version = info['series']
default_role = 'ref'
highlight_language = 'none'
extensions = [
'sphinx.ext.intersphinx',
]
intersphinx_mapping = {
'trytond': (trytond_url.format(series=version), None),
}
intersphinx_mapping.update({
m: (modules_url.format(
module=m.replace('_', '-'), series=version), None)
for m in info['modules']
})
linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*']
del get_info, info, base_url, modules_url, trytond_url
-23
View File
@@ -39,23 +39,6 @@ name = 'trytond_account_deposit'
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/modules/%s#egg=%s-%s' % (
name[8:], name, version))
local_version = []
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)
requires = ['python-dateutil', 'python-sql >= 0.4']
for dep in info.get('depends', []):
@@ -64,11 +47,6 @@ for dep in info.get('depends', []):
requires.append(get_require_version('trytond'))
tests_require = [get_require_version('proteus')]
dependency_links = []
if minor_version % 2:
dependency_links.append(
'https://trydevpi.tryton.org/?local_version='
+ '.'.join(local_version))
setup(name=name,
version=version,
@@ -138,7 +116,6 @@ setup(name=name,
license='GPL-3',
python_requires='>=3.6',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
+3 -3
View File
@@ -7,9 +7,9 @@ deps =
{py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
py36-sqlite: sqlitebck
passenv = *
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
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 --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}} {opts} {packages}
sqlite: DB_NAME={env:DB_NAME::memory:}
postgresql: DB_NAME={env:DB_NAME:test}
-68
View File
@@ -1,68 +0,0 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
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
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
-2
View File
@@ -1,2 +0,0 @@
[flake8]
ignore=E123,E124,E126,E128,E741,W503
+69
View File
@@ -0,0 +1,69 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import os
base_url = os.environ.get('DOC_BASE_URL')
if base_url:
modules_url = base_url + '/modules-{module}/'
trytond_url = base_url + '/server/'
else:
modules_url = (
'https://docs.tryton.org/projects/modules-{module}/en/{series}/')
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
def get_info():
import configparser
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
config = configparser.ConfigParser()
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'] = result.stdout.decode('utf-8').strip()
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
if 'dev' in version:
info['series'] = 'latest'
else:
info['series'] = '.'.join(version.split('.', 2)[:2])
for key in {'depends', 'extras_depend'}:
info[key] = info.get(key, '').strip().splitlines()
info['modules'] = set(info['depends'] + info['extras_depend'])
info['modules'] -= {'ir', 'res'}
return info
info = get_info()
master_doc = 'index'
project = info['name']
release = version = info['series']
default_role = 'ref'
highlight_language = 'none'
extensions = [
'sphinx.ext.intersphinx',
]
intersphinx_mapping = {
'trytond': (trytond_url.format(series=version), None),
}
intersphinx_mapping.update({
m: (modules_url.format(
module=m.replace('_', '-'), series=version), None)
for m in info['modules']
})
linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*']
del get_info, info, base_url, modules_url, trytond_url
-23
View File
@@ -39,23 +39,6 @@ name = 'trytond_account_dunning'
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/modules/%s#egg=%s-%s' % (
name[8:], name, version))
local_version = []
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)
requires = ['python-sql >= 0.4']
for dep in info.get('depends', []):
@@ -64,11 +47,6 @@ for dep in info.get('depends', []):
requires.append(get_require_version('trytond'))
tests_require = [get_require_version('proteus')]
dependency_links = []
if minor_version % 2:
dependency_links.append(
'https://trydevpi.tryton.org/?local_version='
+ '.'.join(local_version))
setup(name=name,
version=version,
@@ -137,7 +115,6 @@ setup(name=name,
license='GPL-3',
python_requires='>=3.6',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
+3 -3
View File
@@ -7,9 +7,9 @@ deps =
{py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
py36-sqlite: sqlitebck
passenv = *
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
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 --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}} {opts} {packages}
sqlite: DB_NAME={env:DB_NAME::memory:}
postgresql: DB_NAME={env:DB_NAME:test}
-68
View File
@@ -1,68 +0,0 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
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
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
-2
View File
@@ -1,2 +0,0 @@
[flake8]
ignore=E123,E124,E126,E128,E741,W503
+69
View File
@@ -0,0 +1,69 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import os
base_url = os.environ.get('DOC_BASE_URL')
if base_url:
modules_url = base_url + '/modules-{module}/'
trytond_url = base_url + '/server/'
else:
modules_url = (
'https://docs.tryton.org/projects/modules-{module}/en/{series}/')
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
def get_info():
import configparser
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
config = configparser.ConfigParser()
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'] = result.stdout.decode('utf-8').strip()
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
if 'dev' in version:
info['series'] = 'latest'
else:
info['series'] = '.'.join(version.split('.', 2)[:2])
for key in {'depends', 'extras_depend'}:
info[key] = info.get(key, '').strip().splitlines()
info['modules'] = set(info['depends'] + info['extras_depend'])
info['modules'] -= {'ir', 'res'}
return info
info = get_info()
master_doc = 'index'
project = info['name']
release = version = info['series']
default_role = 'ref'
highlight_language = 'none'
extensions = [
'sphinx.ext.intersphinx',
]
intersphinx_mapping = {
'trytond': (trytond_url.format(series=version), None),
}
intersphinx_mapping.update({
m: (modules_url.format(
module=m.replace('_', '-'), series=version), None)
for m in info['modules']
})
linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*']
del get_info, info, base_url, modules_url, trytond_url
-23
View File
@@ -39,23 +39,6 @@ name = 'trytond_account_dunning_email'
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/modules/%s#egg=%s-%s' % (
name[8:], name, version))
local_version = []
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)
requires = []
for dep in info.get('depends', []):
@@ -64,11 +47,6 @@ for dep in info.get('depends', []):
requires.append(get_require_version('trytond'))
tests_require = [get_require_version('proteus')]
dependency_links = []
if minor_version % 2:
dependency_links.append(
'https://trydevpi.tryton.org/?local_version='
+ '.'.join(local_version))
setup(name=name,
version=version,
@@ -136,7 +114,6 @@ setup(name=name,
license='GPL-3',
python_requires='>=3.6',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
+3 -3
View File
@@ -7,9 +7,9 @@ deps =
{py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
py36-sqlite: sqlitebck
passenv = *
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
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 --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}} {opts} {packages}
sqlite: DB_NAME={env:DB_NAME::memory:}
postgresql: DB_NAME={env:DB_NAME:test}
-68
View File
@@ -1,68 +0,0 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
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
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
-2
View File
@@ -1,2 +0,0 @@
[flake8]
ignore=E123,E124,E126,E128,E741,W503
+69
View File
@@ -0,0 +1,69 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import os
base_url = os.environ.get('DOC_BASE_URL')
if base_url:
modules_url = base_url + '/modules-{module}/'
trytond_url = base_url + '/server/'
else:
modules_url = (
'https://docs.tryton.org/projects/modules-{module}/en/{series}/')
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
def get_info():
import configparser
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
config = configparser.ConfigParser()
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'] = result.stdout.decode('utf-8').strip()
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
if 'dev' in version:
info['series'] = 'latest'
else:
info['series'] = '.'.join(version.split('.', 2)[:2])
for key in {'depends', 'extras_depend'}:
info[key] = info.get(key, '').strip().splitlines()
info['modules'] = set(info['depends'] + info['extras_depend'])
info['modules'] -= {'ir', 'res'}
return info
info = get_info()
master_doc = 'index'
project = info['name']
release = version = info['series']
default_role = 'ref'
highlight_language = 'none'
extensions = [
'sphinx.ext.intersphinx',
]
intersphinx_mapping = {
'trytond': (trytond_url.format(series=version), None),
}
intersphinx_mapping.update({
m: (modules_url.format(
module=m.replace('_', '-'), series=version), None)
for m in info['modules']
})
linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*']
del get_info, info, base_url, modules_url, trytond_url
-23
View File
@@ -39,23 +39,6 @@ name = 'trytond_account_dunning_fee'
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/modules/%s#egg=%s-%s' % (
name[8:], name, version))
local_version = []
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)
requires = []
for dep in info.get('depends', []):
@@ -65,11 +48,6 @@ requires.append(get_require_version('trytond'))
tests_require = [get_require_version('proteus'),
get_require_version('trytond_account_dunning_letter')]
dependency_links = []
if minor_version % 2:
dependency_links.append(
'https://trydevpi.tryton.org/?local_version='
+ '.'.join(local_version))
setup(name=name,
version=version,
@@ -138,7 +116,6 @@ setup(name=name,
license='GPL-3',
python_requires='>=3.6',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
+3 -3
View File
@@ -7,9 +7,9 @@ deps =
{py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
py36-sqlite: sqlitebck
passenv = *
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
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 --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}} {opts} {packages}
sqlite: DB_NAME={env:DB_NAME::memory:}
postgresql: DB_NAME={env:DB_NAME:test}
-68
View File
@@ -1,68 +0,0 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
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
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
-2
View File
@@ -1,2 +0,0 @@
[flake8]
ignore=E123,E124,E126,E128,E741,W503
@@ -0,0 +1,69 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import os
base_url = os.environ.get('DOC_BASE_URL')
if base_url:
modules_url = base_url + '/modules-{module}/'
trytond_url = base_url + '/server/'
else:
modules_url = (
'https://docs.tryton.org/projects/modules-{module}/en/{series}/')
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
def get_info():
import configparser
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
config = configparser.ConfigParser()
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'] = result.stdout.decode('utf-8').strip()
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
if 'dev' in version:
info['series'] = 'latest'
else:
info['series'] = '.'.join(version.split('.', 2)[:2])
for key in {'depends', 'extras_depend'}:
info[key] = info.get(key, '').strip().splitlines()
info['modules'] = set(info['depends'] + info['extras_depend'])
info['modules'] -= {'ir', 'res'}
return info
info = get_info()
master_doc = 'index'
project = info['name']
release = version = info['series']
default_role = 'ref'
highlight_language = 'none'
extensions = [
'sphinx.ext.intersphinx',
]
intersphinx_mapping = {
'trytond': (trytond_url.format(series=version), None),
}
intersphinx_mapping.update({
m: (modules_url.format(
module=m.replace('_', '-'), series=version), None)
for m in info['modules']
})
linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*']
del get_info, info, base_url, modules_url, trytond_url
-23
View File
@@ -39,23 +39,6 @@ name = 'trytond_account_dunning_letter'
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/modules/%s#egg=%s-%s' % (
name[8:], name, version))
local_version = []
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)
requires = []
for dep in info.get('depends', []):
@@ -64,11 +47,6 @@ for dep in info.get('depends', []):
requires.append(get_require_version('trytond'))
tests_require = [get_require_version('proteus')]
dependency_links = []
if minor_version % 2:
dependency_links.append(
'https://trydevpi.tryton.org/?local_version='
+ '.'.join(local_version))
setup(name=name,
version=version,
@@ -139,7 +117,6 @@ setup(name=name,
license='GPL-3',
python_requires='>=3.6',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
+3 -3
View File
@@ -7,9 +7,9 @@ deps =
{py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
py36-sqlite: sqlitebck
passenv = *
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
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 --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}} {opts} {packages}
sqlite: DB_NAME={env:DB_NAME::memory:}
postgresql: DB_NAME={env:DB_NAME:test}
-68
View File
@@ -1,68 +0,0 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
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
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
-2
View File
@@ -1,2 +0,0 @@
[flake8]
ignore=E123,E124,E126,E128,E741,W503
+69
View File
@@ -0,0 +1,69 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import os
base_url = os.environ.get('DOC_BASE_URL')
if base_url:
modules_url = base_url + '/modules-{module}/'
trytond_url = base_url + '/server/'
else:
modules_url = (
'https://docs.tryton.org/projects/modules-{module}/en/{series}/')
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
def get_info():
import configparser
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
config = configparser.ConfigParser()
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'] = result.stdout.decode('utf-8').strip()
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
if 'dev' in version:
info['series'] = 'latest'
else:
info['series'] = '.'.join(version.split('.', 2)[:2])
for key in {'depends', 'extras_depend'}:
info[key] = info.get(key, '').strip().splitlines()
info['modules'] = set(info['depends'] + info['extras_depend'])
info['modules'] -= {'ir', 'res'}
return info
info = get_info()
master_doc = 'index'
project = info['name']
release = version = info['series']
default_role = 'ref'
highlight_language = 'none'
extensions = [
'sphinx.ext.intersphinx',
]
intersphinx_mapping = {
'trytond': (trytond_url.format(series=version), None),
}
intersphinx_mapping.update({
m: (modules_url.format(
module=m.replace('_', '-'), series=version), None)
for m in info['modules']
})
linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*']
del get_info, info, base_url, modules_url, trytond_url
-23
View File
@@ -39,23 +39,6 @@ name = 'trytond_account_es'
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/modules/%s#egg=%s-%s' % (
name[8:], name, version))
local_version = []
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)
requires = ['python-sql >= 1.1.0']
for dep in info.get('depends', []):
@@ -68,11 +51,6 @@ tests_require = [
get_require_version('trytond_account_asset'),
get_require_version('trytond_account_payment_sepa'),
]
dependency_links = []
if minor_version % 2:
dependency_links.append(
'https://trydevpi.tryton.org/?local_version='
+ '.'.join(local_version))
setup(name=name,
version=version,
@@ -123,7 +101,6 @@ setup(name=name,
license='GPL-3',
python_requires='>=3.6',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
+3 -3
View File
@@ -7,9 +7,9 @@ deps =
{py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
py36-sqlite: sqlitebck
passenv = *
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
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 --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}} {opts} {packages}
sqlite: DB_NAME={env:DB_NAME::memory:}
postgresql: DB_NAME={env:DB_NAME:test}
-68
View File
@@ -1,68 +0,0 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
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
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
-2
View File
@@ -1,2 +0,0 @@
[flake8]
ignore=E123,E124,E126,E128,E741,W503
+69
View File
@@ -0,0 +1,69 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import os
base_url = os.environ.get('DOC_BASE_URL')
if base_url:
modules_url = base_url + '/modules-{module}/'
trytond_url = base_url + '/server/'
else:
modules_url = (
'https://docs.tryton.org/projects/modules-{module}/en/{series}/')
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
def get_info():
import configparser
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
config = configparser.ConfigParser()
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'] = result.stdout.decode('utf-8').strip()
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
if 'dev' in version:
info['series'] = 'latest'
else:
info['series'] = '.'.join(version.split('.', 2)[:2])
for key in {'depends', 'extras_depend'}:
info[key] = info.get(key, '').strip().splitlines()
info['modules'] = set(info['depends'] + info['extras_depend'])
info['modules'] -= {'ir', 'res'}
return info
info = get_info()
master_doc = 'index'
project = info['name']
release = version = info['series']
default_role = 'ref'
highlight_language = 'none'
extensions = [
'sphinx.ext.intersphinx',
]
intersphinx_mapping = {
'trytond': (trytond_url.format(series=version), None),
}
intersphinx_mapping.update({
m: (modules_url.format(
module=m.replace('_', '-'), series=version), None)
for m in info['modules']
})
linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*']
del get_info, info, base_url, modules_url, trytond_url
-23
View File
@@ -39,23 +39,6 @@ name = 'trytond_account_eu'
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/modules/%s#egg=%s-%s' % (
name[8:], name, version))
local_version = []
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)
requires = []
for dep in info.get('depends', []):
@@ -64,11 +47,6 @@ for dep in info.get('depends', []):
requires.append(get_require_version('trytond'))
tests_require = []
dependency_links = []
if minor_version % 2:
dependency_links.append(
'https://trydevpi.tryton.org/?local_version='
+ '.'.join(local_version))
setup(name=name,
version=version,
@@ -135,7 +113,6 @@ setup(name=name,
license='GPL-3',
python_requires='>=3.6',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
+3 -3
View File
@@ -7,9 +7,9 @@ deps =
{py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
py36-sqlite: sqlitebck
passenv = *
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
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 --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}} {opts} {packages}
sqlite: DB_NAME={env:DB_NAME::memory:}
postgresql: DB_NAME={env:DB_NAME:test}
-68
View File
@@ -1,68 +0,0 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
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
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
-2
View File
@@ -1,2 +0,0 @@
[flake8]
ignore=E123,E124,E126,E128,E741,W503
+69
View File
@@ -0,0 +1,69 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import os
base_url = os.environ.get('DOC_BASE_URL')
if base_url:
modules_url = base_url + '/modules-{module}/'
trytond_url = base_url + '/server/'
else:
modules_url = (
'https://docs.tryton.org/projects/modules-{module}/en/{series}/')
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
def get_info():
import configparser
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
config = configparser.ConfigParser()
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'] = result.stdout.decode('utf-8').strip()
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
if 'dev' in version:
info['series'] = 'latest'
else:
info['series'] = '.'.join(version.split('.', 2)[:2])
for key in {'depends', 'extras_depend'}:
info[key] = info.get(key, '').strip().splitlines()
info['modules'] = set(info['depends'] + info['extras_depend'])
info['modules'] -= {'ir', 'res'}
return info
info = get_info()
master_doc = 'index'
project = info['name']
release = version = info['series']
default_role = 'ref'
highlight_language = 'none'
extensions = [
'sphinx.ext.intersphinx',
]
intersphinx_mapping = {
'trytond': (trytond_url.format(series=version), None),
}
intersphinx_mapping.update({
m: (modules_url.format(
module=m.replace('_', '-'), series=version), None)
for m in info['modules']
})
linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*']
del get_info, info, base_url, modules_url, trytond_url
-23
View File
@@ -39,23 +39,6 @@ name = 'trytond_account_fr'
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/modules/%s#egg=%s-%s' % (
name[8:], name, version))
local_version = []
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)
requires = []
for dep in info.get('depends', []):
@@ -64,11 +47,6 @@ for dep in info.get('depends', []):
requires.append(get_require_version('trytond'))
tests_require = [get_require_version('proteus'), 'python-dateutil']
dependency_links = []
if minor_version % 2:
dependency_links.append(
'https://trydevpi.tryton.org/?local_version='
+ '.'.join(local_version))
setup(name=name,
version=version,
@@ -138,7 +116,6 @@ setup(name=name,
license='GPL-3',
python_requires='>=3.6',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
+3 -3
View File
@@ -7,9 +7,9 @@ deps =
{py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
py36-sqlite: sqlitebck
passenv = *
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
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 --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}} {opts} {packages}
sqlite: DB_NAME={env:DB_NAME::memory:}
postgresql: DB_NAME={env:DB_NAME:test}
-68
View File
@@ -1,68 +0,0 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
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
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
-2
View File
@@ -1,2 +0,0 @@
[flake8]
ignore=E123,E124,E126,E128,E741,W503
+69
View File
@@ -0,0 +1,69 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import os
base_url = os.environ.get('DOC_BASE_URL')
if base_url:
modules_url = base_url + '/modules-{module}/'
trytond_url = base_url + '/server/'
else:
modules_url = (
'https://docs.tryton.org/projects/modules-{module}/en/{series}/')
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
def get_info():
import configparser
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
config = configparser.ConfigParser()
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'] = result.stdout.decode('utf-8').strip()
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
if 'dev' in version:
info['series'] = 'latest'
else:
info['series'] = '.'.join(version.split('.', 2)[:2])
for key in {'depends', 'extras_depend'}:
info[key] = info.get(key, '').strip().splitlines()
info['modules'] = set(info['depends'] + info['extras_depend'])
info['modules'] -= {'ir', 'res'}
return info
info = get_info()
master_doc = 'index'
project = info['name']
release = version = info['series']
default_role = 'ref'
highlight_language = 'none'
extensions = [
'sphinx.ext.intersphinx',
]
intersphinx_mapping = {
'trytond': (trytond_url.format(series=version), None),
}
intersphinx_mapping.update({
m: (modules_url.format(
module=m.replace('_', '-'), series=version), None)
for m in info['modules']
})
linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*']
del get_info, info, base_url, modules_url, trytond_url
-23
View File
@@ -39,23 +39,6 @@ name = 'trytond_account_fr_chorus'
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/modules/%s#egg=%s-%s' % (
name[8:], name, version))
local_version = []
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)
requires = ['requests']
for dep in info.get('depends', []):
@@ -64,11 +47,6 @@ for dep in info.get('depends', []):
requires.append(get_require_version('trytond'))
tests_require = [get_require_version('trytond_edocument_uncefact')]
dependency_links = []
if minor_version % 2:
dependency_links.append(
'https://trydevpi.tryton.org/?local_version='
+ '.'.join(local_version))
setup(name=name,
version=version,
@@ -137,7 +115,6 @@ setup(name=name,
license='GPL-3',
python_requires='>=3.6',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
+3 -3
View File
@@ -7,9 +7,9 @@ deps =
{py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
py36-sqlite: sqlitebck
passenv = *
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
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 --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}} {opts} {packages}
sqlite: DB_NAME={env:DB_NAME::memory:}
postgresql: DB_NAME={env:DB_NAME:test}
-68
View File
@@ -1,68 +0,0 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
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
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
-2
View File
@@ -1,2 +0,0 @@
[flake8]
ignore=E123,E124,E126,E128,E741,W503
+12 -4
View File
@@ -1,13 +1,20 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/'
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
import os
base_url = os.environ.get('DOC_BASE_URL')
if base_url:
modules_url = base_url + '/modules-{module}/'
trytond_url = base_url + '/server/'
else:
modules_url = (
'https://docs.tryton.org/projects/modules-{module}/en/{series}/')
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
def get_info():
import configparser
import os
import subprocess
import sys
@@ -57,5 +64,6 @@ intersphinx_mapping.update({
module=m.replace('_', '-'), series=version), None)
for m in info['modules']
})
linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*']
del get_info, info, modules_url, trytond_url
del get_info, info, base_url, modules_url, trytond_url
-23
View File
@@ -42,23 +42,6 @@ name = 'trytond_account_invoice'
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/modules/%s#egg=%s-%s' % (
name[8:], name, version))
local_version = []
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)
requires = ['python-dateutil', 'python-sql >= 0.4']
for dep in info.get('depends', []):
@@ -67,11 +50,6 @@ for dep in info.get('depends', []):
requires.append(get_require_version('trytond'))
tests_require = [get_require_version('proteus')]
dependency_links = []
if minor_version % 2:
dependency_links.append(
'https://trydevpi.tryton.org/?local_version='
+ '.'.join(local_version))
setup(name=name,
version=version,
@@ -142,7 +120,6 @@ setup(name=name,
license='GPL-3',
python_requires='>=3.6',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
+3 -3
View File
@@ -7,9 +7,9 @@ deps =
{py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
py36-sqlite: sqlitebck
passenv = *
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
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 --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}} {opts} {packages}
sqlite: DB_NAME={env:DB_NAME::memory:}
postgresql: DB_NAME={env:DB_NAME:test}
@@ -1,68 +0,0 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
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
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
@@ -1,2 +0,0 @@
[flake8]
ignore=E123,E124,E126,E128,E741,W503
@@ -0,0 +1,69 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import os
base_url = os.environ.get('DOC_BASE_URL')
if base_url:
modules_url = base_url + '/modules-{module}/'
trytond_url = base_url + '/server/'
else:
modules_url = (
'https://docs.tryton.org/projects/modules-{module}/en/{series}/')
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
def get_info():
import configparser
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
config = configparser.ConfigParser()
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'] = result.stdout.decode('utf-8').strip()
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
if 'dev' in version:
info['series'] = 'latest'
else:
info['series'] = '.'.join(version.split('.', 2)[:2])
for key in {'depends', 'extras_depend'}:
info[key] = info.get(key, '').strip().splitlines()
info['modules'] = set(info['depends'] + info['extras_depend'])
info['modules'] -= {'ir', 'res'}
return info
info = get_info()
master_doc = 'index'
project = info['name']
release = version = info['series']
default_role = 'ref'
highlight_language = 'none'
extensions = [
'sphinx.ext.intersphinx',
]
intersphinx_mapping = {
'trytond': (trytond_url.format(series=version), None),
}
intersphinx_mapping.update({
m: (modules_url.format(
module=m.replace('_', '-'), series=version), None)
for m in info['modules']
})
linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*']
del get_info, info, base_url, modules_url, trytond_url
@@ -39,23 +39,6 @@ name = 'trytond_account_invoice_correction'
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/modules/%s#egg=%s-%s' % (
name[8:], name, version))
local_version = []
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)
requires = []
for dep in info.get('depends', []):
@@ -64,11 +47,6 @@ for dep in info.get('depends', []):
requires.append(get_require_version('trytond'))
tests_require = [get_require_version('proteus')]
dependency_links = []
if minor_version % 2:
dependency_links.append(
'https://trydevpi.tryton.org/?local_version='
+ '.'.join(local_version))
setup(name=name,
version=version,
@@ -139,7 +117,6 @@ setup(name=name,
license='GPL-3',
python_requires='>=3.6',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
+3 -3
View File
@@ -7,9 +7,9 @@ deps =
{py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
py36-sqlite: sqlitebck
passenv = *
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
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 --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}} {opts} {packages}
sqlite: DB_NAME={env:DB_NAME::memory:}
postgresql: DB_NAME={env:DB_NAME:test}
-68
View File
@@ -1,68 +0,0 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
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
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
-2
View File
@@ -1,2 +0,0 @@
[flake8]
ignore=E123,E124,E126,E128,E741,W503
+12 -4
View File
@@ -1,13 +1,20 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/'
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
import os
base_url = os.environ.get('DOC_BASE_URL')
if base_url:
modules_url = base_url + '/modules-{module}/'
trytond_url = base_url + '/server/'
else:
modules_url = (
'https://docs.tryton.org/projects/modules-{module}/en/{series}/')
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
def get_info():
import configparser
import os
import subprocess
import sys
@@ -57,5 +64,6 @@ intersphinx_mapping.update({
module=m.replace('_', '-'), series=version), None)
for m in info['modules']
})
linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*']
del get_info, info, modules_url, trytond_url
del get_info, info, base_url, modules_url, trytond_url
-24
View File
@@ -42,24 +42,7 @@ name = 'trytond_account_invoice_defer'
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/modules/%s#egg=%s-%s' % (
name[8:], name, version))
local_version = []
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)
requires = []
for dep in info.get('depends', []):
if not re.match(r'(ir|res)(\W|$)', dep):
@@ -67,12 +50,6 @@ for dep in info.get('depends', []):
requires.append(get_require_version('trytond'))
tests_require = [get_require_version('proteus')]
dependency_links = []
if minor_version % 2:
dependency_links.append(
'https://trydevpi.tryton.org/?local_version='
+ '.'.join(local_version)
)
setup(name=name,
version=version,
@@ -143,7 +120,6 @@ setup(name=name,
license='GPL-3',
python_requires='>=3.6',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]

Some files were not shown because too many files have changed in this diff Show More