Prepare migration to monorepo
This commit is contained in:
@@ -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
|
||||
Executable
+169
@@ -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)
|
||||
Executable
+24
@@ -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
|
||||
Executable
+9
@@ -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
|
||||
@@ -0,0 +1,174 @@
|
||||
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-isort:
|
||||
extends: .check
|
||||
script:
|
||||
- isort -m VERTICAL_GRID -p trytond -c `hg status --no-status --added --modified --rev s0`
|
||||
|
||||
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.7", "3.8", "3.9", "3.10"]
|
||||
|
||||
.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
|
||||
Executable
+45
@@ -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())
|
||||
@@ -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
|
||||
Executable
+30
@@ -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')
|
||||
Executable
+79
@@ -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
@@ -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
|
||||
@@ -1,78 +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/*
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
check_doc:
|
||||
image: ${IMAGE}
|
||||
commands:
|
||||
- pip install sphinx
|
||||
- python -m sphinx -T -E -W -n -b html doc _build/html
|
||||
- python -m sphinx -T -E -W -n -b linkcheck doc _build
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
|
||||
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.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
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: postgresql
|
||||
@@ -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
|
||||
|
||||
@@ -43,23 +43,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', []):
|
||||
@@ -68,11 +51,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,
|
||||
@@ -145,7 +123,6 @@ setup(name=name,
|
||||
extras_require={
|
||||
'test': tests_require,
|
||||
},
|
||||
dependency_links=dependency_links,
|
||||
zip_safe=False,
|
||||
entry_points="""
|
||||
[trytond.modules]
|
||||
|
||||
@@ -9,9 +9,9 @@ commands =
|
||||
deps =
|
||||
coverage
|
||||
postgresql: psycopg2 >= 2.7.0
|
||||
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,70 +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/*
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
|
||||
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.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
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: postgresql
|
||||
@@ -1,2 +0,0 @@
|
||||
[flake8]
|
||||
ignore=E123,E124,E126,E128,E741,W503
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
multi_line_output=4
|
||||
known_first_party=trytond
|
||||
@@ -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
|
||||
@@ -40,23 +40,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', 'python-sql']
|
||||
for dep in info.get('depends', []):
|
||||
@@ -66,12 +49,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,
|
||||
@@ -144,7 +121,6 @@ setup(name=name,
|
||||
extras_require={
|
||||
'test': tests_require,
|
||||
},
|
||||
dependency_links=dependency_links,
|
||||
zip_safe=False,
|
||||
entry_points="""
|
||||
[trytond.modules]
|
||||
|
||||
@@ -9,9 +9,9 @@ commands =
|
||||
deps =
|
||||
coverage
|
||||
postgresql: psycopg2 >= 2.7.0
|
||||
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,70 +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/*
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
|
||||
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.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
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: postgresql
|
||||
@@ -1,2 +0,0 @@
|
||||
[flake8]
|
||||
ignore=E123,E124,E126,E128,E741,W503
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
multi_line_output=4
|
||||
known_first_party=trytond
|
||||
@@ -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
|
||||
@@ -40,23 +40,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', []):
|
||||
@@ -64,12 +47,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.7',
|
||||
install_requires=requires,
|
||||
dependency_links=dependency_links,
|
||||
zip_safe=False,
|
||||
entry_points="""
|
||||
[trytond.modules]
|
||||
|
||||
@@ -8,9 +8,9 @@ commands =
|
||||
deps =
|
||||
coverage
|
||||
postgresql: psycopg2 >= 2.7.0
|
||||
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,78 +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/*
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
check_doc:
|
||||
image: ${IMAGE}
|
||||
commands:
|
||||
- pip install sphinx
|
||||
- python -m sphinx -T -E -W -n -b html doc _build/html
|
||||
- python -m sphinx -T -E -W -n -b linkcheck doc _build
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
|
||||
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.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
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: postgresql
|
||||
@@ -1,2 +0,0 @@
|
||||
[flake8]
|
||||
ignore=E123,E124,E126,E128,E741,W503
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
multi_line_output=4
|
||||
known_first_party=trytond
|
||||
@@ -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
|
||||
|
||||
@@ -43,24 +43,7 @@ name = 'trytond_account_budget'
|
||||
|
||||
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):
|
||||
@@ -68,12 +51,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,
|
||||
@@ -148,7 +125,6 @@ setup(name=name,
|
||||
extras_require={
|
||||
'test': tests_require,
|
||||
},
|
||||
dependency_links=dependency_links,
|
||||
zip_safe=False,
|
||||
entry_points="""
|
||||
[trytond.modules]
|
||||
|
||||
@@ -9,9 +9,9 @@ commands =
|
||||
deps =
|
||||
coverage
|
||||
postgresql: psycopg2 >= 2.7.0
|
||||
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,70 +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/*
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
|
||||
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.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
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: postgresql
|
||||
@@ -1,2 +0,0 @@
|
||||
[flake8]
|
||||
ignore=E123,E124,E126,E128,E741,W503
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
multi_line_output=4
|
||||
known_first_party=trytond
|
||||
@@ -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
|
||||
@@ -43,23 +43,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', []):
|
||||
@@ -70,11 +53,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,
|
||||
@@ -148,7 +126,6 @@ setup(name=name,
|
||||
extras_require={
|
||||
'test': tests_require,
|
||||
},
|
||||
dependency_links=dependency_links,
|
||||
zip_safe=False,
|
||||
entry_points="""
|
||||
[trytond.modules]
|
||||
|
||||
@@ -9,9 +9,9 @@ commands =
|
||||
deps =
|
||||
coverage
|
||||
postgresql: psycopg2 >= 2.7.0
|
||||
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,78 +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/*
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
check_doc:
|
||||
image: ${IMAGE}
|
||||
commands:
|
||||
- pip install sphinx
|
||||
- python -m sphinx -T -E -W -n -b html doc _build/html
|
||||
- python -m sphinx -T -E -W -n -b linkcheck doc _build
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
|
||||
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.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
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: postgresql
|
||||
@@ -1,2 +0,0 @@
|
||||
[flake8]
|
||||
ignore=E123,E124,E126,E128,E741,W503
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
multi_line_output=4
|
||||
known_first_party=trytond
|
||||
@@ -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
|
||||
|
||||
@@ -43,23 +43,6 @@ name = 'trytond_account_consolidation'
|
||||
|
||||
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', []):
|
||||
@@ -71,12 +54,6 @@ tests_require = [
|
||||
get_require_version('proteus'),
|
||||
get_require_version('trytond_account_invoice'),
|
||||
]
|
||||
dependency_links = []
|
||||
if minor_version % 2:
|
||||
dependency_links.append(
|
||||
'https://trydevpi.tryton.org/?local_version='
|
||||
+ '.'.join(local_version)
|
||||
)
|
||||
|
||||
setup(name=name,
|
||||
version=version,
|
||||
@@ -151,7 +128,6 @@ setup(name=name,
|
||||
extras_require={
|
||||
'test': tests_require,
|
||||
},
|
||||
dependency_links=dependency_links,
|
||||
zip_safe=False,
|
||||
entry_points="""
|
||||
[trytond.modules]
|
||||
|
||||
@@ -9,9 +9,9 @@ commands =
|
||||
deps =
|
||||
coverage
|
||||
postgresql: psycopg2 >= 2.7.0
|
||||
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,70 +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/*
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
|
||||
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.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
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: postgresql
|
||||
@@ -1,2 +0,0 @@
|
||||
[flake8]
|
||||
ignore=E123,E124,E126,E128,E741,W503
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
multi_line_output=4
|
||||
known_first_party=trytond
|
||||
@@ -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
|
||||
@@ -40,23 +40,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', []):
|
||||
@@ -65,11 +48,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,
|
||||
@@ -142,7 +120,6 @@ setup(name=name,
|
||||
extras_require={
|
||||
'test': tests_require,
|
||||
},
|
||||
dependency_links=dependency_links,
|
||||
zip_safe=False,
|
||||
entry_points="""
|
||||
[trytond.modules]
|
||||
|
||||
@@ -9,9 +9,9 @@ commands =
|
||||
deps =
|
||||
coverage
|
||||
postgresql: psycopg2 >= 2.7.0
|
||||
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,70 +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/*
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
|
||||
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.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
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: postgresql
|
||||
@@ -1,2 +0,0 @@
|
||||
[flake8]
|
||||
ignore=E123,E124,E126,E128,E741,W503
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
multi_line_output=4
|
||||
known_first_party=trytond
|
||||
@@ -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
|
||||
@@ -40,23 +40,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', []):
|
||||
@@ -64,12 +47,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',
|
||||
@@ -118,7 +95,6 @@ setup(name=name,
|
||||
license='GPL-3',
|
||||
python_requires='>=3.7',
|
||||
install_requires=requires,
|
||||
dependency_links=dependency_links,
|
||||
zip_safe=False,
|
||||
entry_points="""
|
||||
[trytond.modules]
|
||||
|
||||
@@ -8,9 +8,9 @@ commands =
|
||||
deps =
|
||||
coverage
|
||||
postgresql: psycopg2 >= 2.7.0
|
||||
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,70 +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/*
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
|
||||
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.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
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: postgresql
|
||||
@@ -1,2 +0,0 @@
|
||||
[flake8]
|
||||
ignore=E123,E124,E126,E128,E741,W503
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
multi_line_output=4
|
||||
known_first_party=trytond
|
||||
@@ -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
|
||||
@@ -40,23 +40,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', []):
|
||||
@@ -65,11 +48,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,
|
||||
extras_require={
|
||||
'test': tests_require,
|
||||
},
|
||||
dependency_links=dependency_links,
|
||||
zip_safe=False,
|
||||
entry_points="""
|
||||
[trytond.modules]
|
||||
|
||||
@@ -9,9 +9,9 @@ commands =
|
||||
deps =
|
||||
coverage
|
||||
postgresql: psycopg2 >= 2.7.0
|
||||
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,70 +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/*
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
|
||||
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.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
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: postgresql
|
||||
@@ -1,2 +0,0 @@
|
||||
[flake8]
|
||||
ignore=E123,E124,E126,E128,E741,W503
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
multi_line_output=4
|
||||
known_first_party=trytond
|
||||
@@ -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
|
||||
@@ -40,23 +40,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', []):
|
||||
@@ -65,11 +48,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,
|
||||
extras_require={
|
||||
'test': tests_require,
|
||||
},
|
||||
dependency_links=dependency_links,
|
||||
zip_safe=False,
|
||||
entry_points="""
|
||||
[trytond.modules]
|
||||
|
||||
@@ -9,9 +9,9 @@ commands =
|
||||
deps =
|
||||
coverage
|
||||
postgresql: psycopg2 >= 2.7.0
|
||||
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,70 +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/*
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
|
||||
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.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
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: postgresql
|
||||
@@ -1,2 +0,0 @@
|
||||
[flake8]
|
||||
ignore=E123,E124,E126,E128,E741,W503
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
multi_line_output=4
|
||||
known_first_party=trytond
|
||||
@@ -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
|
||||
@@ -40,23 +40,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', []):
|
||||
@@ -65,11 +48,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,
|
||||
@@ -140,7 +118,6 @@ setup(name=name,
|
||||
extras_require={
|
||||
'test': tests_require,
|
||||
},
|
||||
dependency_links=dependency_links,
|
||||
zip_safe=False,
|
||||
entry_points="""
|
||||
[trytond.modules]
|
||||
|
||||
@@ -9,9 +9,9 @@ commands =
|
||||
deps =
|
||||
coverage
|
||||
postgresql: psycopg2 >= 2.7.0
|
||||
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,70 +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/*
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
|
||||
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.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
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: postgresql
|
||||
@@ -1,2 +0,0 @@
|
||||
[flake8]
|
||||
ignore=E123,E124,E126,E128,E741,W503
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
multi_line_output=4
|
||||
known_first_party=trytond
|
||||
@@ -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
|
||||
@@ -40,23 +40,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', []):
|
||||
@@ -66,11 +49,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,
|
||||
@@ -142,7 +120,6 @@ setup(name=name,
|
||||
extras_require={
|
||||
'test': tests_require,
|
||||
},
|
||||
dependency_links=dependency_links,
|
||||
zip_safe=False,
|
||||
entry_points="""
|
||||
[trytond.modules]
|
||||
|
||||
@@ -9,9 +9,9 @@ commands =
|
||||
deps =
|
||||
coverage
|
||||
postgresql: psycopg2 >= 2.7.0
|
||||
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,70 +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/*
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
|
||||
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.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
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: postgresql
|
||||
@@ -1,2 +0,0 @@
|
||||
[flake8]
|
||||
ignore=E123,E124,E126,E128,E741,W503
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
multi_line_output=4
|
||||
known_first_party=trytond
|
||||
@@ -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
|
||||
@@ -40,23 +40,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', []):
|
||||
@@ -65,11 +48,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 +121,6 @@ setup(name=name,
|
||||
extras_require={
|
||||
'test': tests_require,
|
||||
},
|
||||
dependency_links=dependency_links,
|
||||
zip_safe=False,
|
||||
entry_points="""
|
||||
[trytond.modules]
|
||||
|
||||
@@ -9,9 +9,9 @@ commands =
|
||||
deps =
|
||||
coverage
|
||||
postgresql: psycopg2 >= 2.7.0
|
||||
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,70 +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/*
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
|
||||
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.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
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: postgresql
|
||||
@@ -1,2 +0,0 @@
|
||||
[flake8]
|
||||
ignore=E123,E124,E126,E128,E741,W503
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
multi_line_output=4
|
||||
known_first_party=trytond
|
||||
@@ -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
|
||||
@@ -40,23 +40,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', 'phonenumbers']
|
||||
for dep in info.get('depends', []):
|
||||
@@ -70,11 +53,6 @@ tests_require = [
|
||||
get_require_version('trytond_account_payment_sepa'),
|
||||
get_require_version('trytond_sale_advance_payment'),
|
||||
]
|
||||
dependency_links = []
|
||||
if minor_version % 2:
|
||||
dependency_links.append(
|
||||
'https://trydevpi.tryton.org/?local_version='
|
||||
+ '.'.join(local_version))
|
||||
|
||||
setup(name=name,
|
||||
version=version,
|
||||
@@ -127,7 +105,6 @@ setup(name=name,
|
||||
extras_require={
|
||||
'test': tests_require,
|
||||
},
|
||||
dependency_links=dependency_links,
|
||||
zip_safe=False,
|
||||
entry_points="""
|
||||
[trytond.modules]
|
||||
|
||||
@@ -9,9 +9,9 @@ commands =
|
||||
deps =
|
||||
coverage
|
||||
postgresql: psycopg2 >= 2.7.0
|
||||
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,78 +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/*
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
check_doc:
|
||||
image: ${IMAGE}
|
||||
commands:
|
||||
- pip install sphinx
|
||||
- python -m sphinx -T -E -W -n -b html doc _build/html
|
||||
- python -m sphinx -T -E -W -n -b linkcheck doc _build
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
|
||||
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.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
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: postgresql
|
||||
@@ -1,2 +0,0 @@
|
||||
[flake8]
|
||||
ignore=E123,E124,E126,E128,E741,W503
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
multi_line_output=4
|
||||
known_first_party=trytond
|
||||
@@ -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
|
||||
|
||||
@@ -43,23 +43,6 @@ name = 'trytond_account_es_sii'
|
||||
|
||||
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 = ['zeep', 'requests']
|
||||
for dep in info.get('depends', []):
|
||||
@@ -68,11 +51,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,
|
||||
@@ -147,7 +125,6 @@ setup(name=name,
|
||||
extras_require={
|
||||
'test': tests_require,
|
||||
},
|
||||
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
Reference in New Issue
Block a user