Upgrade to pyproject using hatchling as build-system

This commit is contained in:
Cédric Krier
2026-03-21 18:46:34 +01:00
parent d6dc19b523
commit e15c0b7d7a
1590 changed files with 17346 additions and 38132 deletions
+18 -23
View File
@@ -22,6 +22,12 @@ packages:
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/tryton/ci
variables:
DOC_BASE_URL: ${CI_PROJECT_DIR}/docs
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip/http-v2
before_script:
- pip install build "hatchling >= 1" hatch-tryton babel rnc2rng
script:
- .gitlab-scripts/generate-packages.sh packages
artifacts:
@@ -32,6 +38,14 @@ packages:
documentation:
stage: preparation
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/sphinxdoc/sphinx
variables:
DOC_NO_ISOLATION: true
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip/http-v2
before_script:
- pip install build "hatchling >= 1" hatch-tryton babel rnc2rng
script:
- .gitlab-scripts/generate-doc.sh docs
- find docs -type f -not -name 'objects.inv' -delete
@@ -60,13 +74,14 @@ documentation:
variables:
DOC_BASE_URL: ${CI_PROJECT_DIR}/docs
DOC_DIR: doc
DOC_NO_ISOLATION: true
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip/http-v2
before_script:
- pip install setuptools
- pip install -r "${PACKAGE}/${DOC_DIR}/requirements-doc.txt"
- pip install build "hatchling >= 1" hatch-tryton babel rnc2rng
- pip install sphinx-lint rstcheck[sphinx]
script:
- cd "${PACKAGE}"
@@ -244,10 +259,10 @@ check-account-chart:
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
reports:
junit: ${PACKAGE}/junit.xml
junit: ${PACKAGE}/.tox/junit.xml
coverage_report:
coverage_format: cobertura
path: ${PACKAGE}/coverage.xml
path: ${PACKAGE}/.tox/coverage.xml
parallel:
matrix:
- PYTHON_VERSION: ["3.9", "3.10", "3.11", "3.12", "3.13"]
@@ -313,26 +328,6 @@ check-doc-trytond:
variables:
PACKAGE: trytond
check-trytond-rng:
extends: .check
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip/http-v2
before_script:
- pip install rnc2rng
script:
- python trytond/setup.py update_rng
- |
if [ `hg status trytond| wc -l` -ne 0 ]; then
false
fi
rules:
- changes:
- trytond/**/*.rnc
- trytond/**/*.rng
test-trytond-sqlite:
extends: .test-sqlite
variables:
+1 -1
View File
@@ -3,7 +3,7 @@ set -eu
OUTPUT=${1:-`mktemp -d`}
find modules -maxdepth 2 -name setup.py -print | while read path
find modules -maxdepth 2 -name pyproject.toml -print | while read path
do
path=`dirname "${path}"`
module=`basename "${path}"`
+1 -1
View File
@@ -62,7 +62,7 @@ def render(file):
def all_packages():
root_dir = os.path.dirname(BASE_DIR)
for filename in chain(
glob.glob('modules/*/setup.py', root_dir=root_dir)):
glob.glob('modules/*/pyproject.toml', root_dir=root_dir)):
yield os.path.dirname(filename)
-1
View File
@@ -9,7 +9,6 @@ export DOC_BASE_URL
requirements=$(mktemp "${TMPDIR}/requirements-doc-XXXXXXXXXX.txt")
find . -name 'cookiecutter*' -prune -o -path '*/doc/requirements-doc.txt' -exec cat {} + | sort | uniq > "${requirements}"
pip install setuptools
pip install -r "${requirements}"
(find . -name 'cookiecutter*' -prune -o -path '*/doc/conf.py' -print | while read path; do
+2 -2
View File
@@ -4,6 +4,6 @@ set -eu
PACKAGES=`realpath "${1}"`
mkdir -p "${PACKAGES}"
(find . -name 'cookiecutter*' -prune -o -name setup.py -print | while read path; do
(find . -name 'cookiecutter*' -prune -o -name pyproject.toml -print | while read path; do
echo "`dirname ${path}`"
done) | xargs --max-procs=$(( `nproc` * 2)) -I '{}' sh -c "cd \"{}\" && python setup.py --quiet sdist --dist-dir \"${PACKAGES}\""
done) | xargs --max-procs=$(( `nproc` * 2)) -I '{}' sh -c "cd \"{}\" && python -m build --no-isolation --wheel --quiet --outdir \"${PACKAGES}\""
+2
View File
@@ -1,5 +1,7 @@
syntax: glob
*.py[cdo]
*.mo
*.rng
*.egg-info
dist/
build/
+2 -2
View File
@@ -12,11 +12,11 @@ destination = os.path.join(root, 'trytond', 'trytond', 'modules')
modules = set()
try:
filenames = glob.glob('modules/*/setup.py', root_dir=root)
filenames = glob.glob('modules/*/pyproject.toml', root_dir=root)
except TypeError:
# If root_dir is not supported, fallback considering the hook is executed
# from the repository root
filenames = glob.glob('modules/*/setup.py')
filenames = glob.glob('modules/*/pyproject.toml')
for filename in filenames:
modules.add(os.path.basename(os.path.dirname(filename)))
+24 -43
View File
@@ -3,10 +3,13 @@
# this repository contains the full copyright notices and license terms.
import io
import json
import os
import subprocess
from multiprocessing.dummy import Pool
from packaging.requirements import Requirement
root = os.path.dirname(os.path.dirname(__file__))
module_path = os.path.join(root, 'modules')
@@ -23,64 +26,42 @@ development_dependencies = {
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')):
def add_dependencies(package):
metadata = subprocess.check_output(
'python -m build -n -q --metadata',
shell=True, encoding='utf-8', cwd=package).strip()
metadata = json.loads(metadata)
for requirement in metadata.get('requires_dist', []):
requirement = Requirement(requirement)
if (requirement.name.startswith('trytond')
or requirement.name in {'proteus', 'tryton'}):
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]
development = bool(requirement.marker)
requirement.marker = None
if development:
development_dependencies.add(dependency)
development_dependencies.add(requirement)
else:
dependencies.add(dependency)
dependencies.add(requirement)
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')))
pool.apply_async(add_dependencies, (os.path.join(root, 'trytond'),))
pool.apply_async(add_dependencies, (os.path.join(root, 'tryton'),))
pool.apply_async(add_dependencies, (os.path.join(root, 'proteus'),))
pool.apply_async(add_dependencies, (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.apply_async(add_dependencies, (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)))
fp.writelines(map(lambda d: d + '\n', sorted(map(str, dependencies))))
with io.open(os.path.join(root, 'requirements-dev.txt'), 'w') as fp:
fp.writelines(map(lambda d: d + '\n', sorted(development_dependencies)))
fp.writelines(
map(lambda d: d + '\n', sorted(map(str, development_dependencies))))
+6 -2
View File
@@ -41,9 +41,13 @@ the ``.hg/hgrc``:
[hooks]
update.modules = .hooks/link_modules
update.requirements = .hooks/update_requirements
update.trytond = trytond/hatch_build.py
update.tryton = tryton/hatch_build.py
On ``hg update``, the first hook will automatically create symlinks for modules
and the second hook will automatically generate requirements files.
On ``hg update``, the first hook will automatically create symlinks for
modules, the second hook will automatically generate requirements files, the
third generate the ``RNG`` files for ``trytond`` and the last compile the
translation files for ``tryton``.
Submit Change
=============
+2 -4
View File
@@ -4,10 +4,8 @@
"package_name": "{% if not cookiecutter.prefix %}trytond_{{ cookiecutter.module_name }}{% else %}{{ cookiecutter.prefix }}_{{ cookiecutter.module_name }}{% endif %}",
"version": "{{ version }}",
"description": "",
"author": "Tryton",
"author_email": "foundation@tryton.org",
"fullname": "",
"url": "http://www.tryton.org/",
"author": "",
"author_email": "",
"keywords": "",
"test_with_scenario": "",
"_extensions": ["extensions.Version"]
@@ -5,3 +5,10 @@ try:
os.symlink('doc/index.rst', 'README.rst')
except (AttributeError, OSError):
shutil.copyfile('doc/index.rst', 'README.rst')
{% if cookiecutter.prefix %}
try:
os.symlink('.', '{{ cookiecutter.package_name }}')
except (AttributeError, OSError):
pass
{% endif %}
@@ -1,4 +1,4 @@
Copyright (C) {% now 'local', '%Y' %} {{ cookiecutter.fullname }}
Copyright (C) {% now 'local', '%Y' %} {{ cookiecutter.author }}{% if cookiecutter.author_email %} <{{ cookiecutter.author_email }}>{% endif %}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,8 +17,8 @@ else:
def get_info():
import configparser
import json
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
@@ -26,17 +26,15 @@ def get_info():
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name', '--description'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'], info['description'] = (
result.stdout.decode('utf-8').strip().splitlines())
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
major_version, minor_version, _ = version.split('.', 2)
metadata_cmd = 'python -m build --quiet --metadata'
if os.environ.get('DOC_NO_ISOLATION'):
metadata_cmd += ' --no-isolation'
metadata = subprocess.check_output(
metadata_cmd, shell=True, encoding='utf-8', cwd=module_dir).strip()
metadata = json.loads(metadata)
info['name'] = metadata['name']
info['description'] = metadata['summary']
major_version, minor_version, _ = metadata['version'].split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
if minor_version % 2:
@@ -1,2 +1,3 @@
build
sphinx_book_theme
sphinx_copybutton
@@ -0,0 +1,89 @@
[build-system]
requires = ['hatchling >= 1', 'hatch-tryton']
build-backend = 'hatchling.build'
[project]
name = '{{ cookiecutter.package_name }}'
dynamic = ['version', 'dependencies', 'optional-dependencies', 'authors', 'readme']
requires-python = '>=3.9'
maintainers = [
{%- if cookiecutter.prefix %}
{name = "{{ cookiecutter.author }}", email = "{{ cookiecutter.author_email }}"},
{%- else %}
{name = "Tryton", email = "foundation@tryton.org"},
{%- endif %}
]
description = "{{ cookiecutter.description }}"
license = 'GPL-3.0-or-later'
license-files = ['LICENSE', 'icons/LICENSE', 'COPYRIGHT']
keywords = {{ cookiecutter.keywords.split() | tojson }}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Plugins",
"Framework :: Tryton",
"Topic :: Office/Business",
{%- if cookiecutter.module_name.startswith('account') or cookiecutter.module_name.startswith('analytic_account')%}
"Topic :: Office/Business :: Financial :: Accounting",
{%- endif %}
{%- if cookiecutter.module_name.startswith('sale') %}
"Topic :: Office/Business :: Financial :: Point-Of-Sale",
{%- endif %}
"Topic :: Software Development :: Libraries :: Python Modules",
]
[project.entry-points.'trytond.modules']
{%- if cookiecutter.prefix %}
{{ cookiecutter.module_name }} = '{{ cookiecutter.package_name }}'
{%- else %}
{{ cookiecutter.module_name }} = 'trytond.modules.{{ cookiecutter.module_name }}'
{%- endif %}
[project.urls]
{%- if not cookiecutter.prefix %}
homepage = "https://www.tryton.org/"
documentation = "https://docs.tryton.org/modules-{{ cookiecutter.module_name|replace('_', '-') }}/"
changelog = "https://docs.tryton.org/modules-{{ cookiecutter.module_name|replace('_', '-') }}/releases.html"
forum = "https://www.tryton.org/forum"
issues = "https://bugs.tryton.org/tryton"
repository = "https://code.tryton.org/tryton"
funding = "https://www.tryton.org/donate"
{%- endif %}
[tool.hatch.build]
include = [
'**/tryton.cfg',
'**/*.py',
'**/*.xml',
'view/**/*.xml',
'locale/**/*.po',
'**/*.fodt',
'icons/**/*.svg',
'tests/**/*.rst',
'tests/**/*.json',
]
exclude = ['doc']
{%- if cookiecutter.prefix %}
dev-mode-dirs = ["."]
{%- endif %}
[tool.hatch.build.targets.wheel.sources]
{%- if cookiecutter.prefix %}
"" = "{{ cookiecutter.module_name }}"
{%- else %}
"" = "trytond/modules/{{ cookiecutter.module_name }}"
{%- endif %}
[tool.hatch.metadata.hooks.tryton]
{%- if cookiecutter.prefix %}
prefix = {}
{%- endif %}
dependencies = []
copyright = 'COPYRIGHT'
readme = 'README.rst'
[tool.hatch.metadata.hooks.tryton.tryton-optional-dependencies]
{%- if cookiecutter.test_with_scenario %}
test = ['proteus']
{%- else %}
test = []
{%- endif %}
@@ -1,149 +0,0 @@
#!/usr/bin/env python3
{% if not cookiecutter.prefix -%}
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
{% endif -%}
import io
import os
import re
from configparser import ConfigParser
from setuptools import find_packages, setup
{%- if cookiecutter.prefix %}
MODULE2PREFIX = {}
{%- endif %}
def read(fname):
content = io.open(
os.path.join(os.path.dirname(__file__), fname),
'r', encoding='utf-8').read()
content = re.sub(
r'(?m)^\.\. toctree::\r?\n((^$|^\s.*$)\r?\n)*', '', content)
return content
def get_require_version(name):
require = '%s >= %s.%s, < %s.%s'
require %= (name, major_version, minor_version,
major_version, minor_version + 1)
return require
config = ConfigParser()
config.read_file(open(os.path.join(os.path.dirname(__file__), 'tryton.cfg')))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
if key in info:
info[key] = info[key].strip().splitlines()
version = info.get('version', '0.0.1')
major_version, minor_version, _ = version.split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
name = '{{ cookiecutter.package_name }}'
{% if not cookiecutter.prefix %}
if minor_version % 2:
download_url = ''
else:
download_url = 'http://downloads.tryton.org/%s.%s/' % (
major_version, minor_version)
{% endif %}
requires = []
for dep in info.get('depends', []):
if not re.match(r'(ir|res)(\W|$)', dep):
{%- if not cookiecutter.prefix %}
requires.append(get_require_version('trytond_%s' % dep))
{%- else %}
prefix = MODULE2PREFIX.get(dep, 'trytond')
requires.append(get_require_version('%s_%s' % (prefix, dep)))
{%- endif %}
requires.append(get_require_version('trytond'))
{% if cookiecutter.test_with_scenario -%}
tests_require = [get_require_version('proteus')]
{%- else -%}
tests_require = []
{%- endif %}
setup(name=name,
version=version,
description='{{ cookiecutter.description }}',
long_description=read('README.rst'),
author='{{ cookiecutter.author }}',
author_email='{{ cookiecutter.author_email }}',
url='{{ cookiecutter.url }}',
{%- if not cookiecutter.prefix %}
download_url=download_url,
project_urls={
"Bug Tracker": 'https://bugs.tryton.org/',
"Documentation": 'https://docs.tryton.org/latest/modules-{{ cookiecutter.module_name|replace('_', '-') }}',
"Forum": 'https://www.tryton.org/forum',
"Source Code": 'https://code.tryton.org/tryton',
},
{%- endif %}
keywords='{{ cookiecutter.keywords }}',
package_dir={'trytond.modules.{{ cookiecutter.module_name }}': '.'},
packages=(
['trytond.modules.{{ cookiecutter.module_name }}']
+ ['trytond.modules.{{ cookiecutter.module_name }}.%s' % p
for p in find_packages()]
),
package_data={
'trytond.modules.{{ cookiecutter.module_name }}': (info.get('xml', [])
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.fodt',
'icons/*.svg', 'tests/*.rst', 'tests/*.json']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Framework :: Tryton',
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Intended Audience :: Legal Industry',
'License :: OSI Approved :: '
'GNU General Public License v3 or later (GPLv3+)',
'Natural Language :: Bulgarian',
'Natural Language :: Catalan',
'Natural Language :: Chinese (Simplified)',
'Natural Language :: Czech',
'Natural Language :: Dutch',
'Natural Language :: English',
'Natural Language :: Finnish',
'Natural Language :: French',
'Natural Language :: German',
'Natural Language :: Hungarian',
'Natural Language :: Indonesian',
'Natural Language :: Italian',
'Natural Language :: Persian',
'Natural Language :: Polish',
'Natural Language :: Portuguese (Brazilian)',
'Natural Language :: Romanian',
'Natural Language :: Russian',
'Natural Language :: Slovenian',
'Natural Language :: Spanish',
'Natural Language :: Turkish',
'Natural Language :: Ukrainian',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Office/Business',
],
license='GPL-3',
python_requires='>=3.9',
install_requires=requires,
extras_require={
'test': tests_require,
},
zip_safe=False,
entry_points="""
[trytond.modules]
{{ cookiecutter.module_name }} = trytond.modules.{{ cookiecutter.module_name }}
""", # noqa: E501
)
@@ -2,10 +2,14 @@
envlist = {py39,py310,py311,py312,py313}-{sqlite,postgresql}
[testenv]
usedevelop = true
changedir = {toxworkdir}
extras = test
commands =
coverage run --omit=*/tests/* -m xmlrunner discover -s tests {posargs}
{%- if cookiecutter.prefix %}
coverage run --source={{ cookiecutter.module_name }} --omit=*/tests/* -m xmlrunner discover -s {{ cookiecutter.module_name }} {posargs}
{%- else %}
coverage run --source=trytond.modules.{{ cookiecutter.module_name }} --omit=*/tests/* -m xmlrunner discover -s trytond.modules.{{ cookiecutter.module_name }} {posargs}
{%- endif %}
commands_post =
coverage report
coverage xml
+8 -6
View File
@@ -19,18 +19,20 @@ else:
def get_info():
import json
import subprocess
import sys
trytond_dir = os.path.join(os.path.dirname(__file__), '../trytond')
info = dict()
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=trytond_dir)
version = result.stdout.decode('utf-8').strip()
major_version, minor_version, _ = version.split('.', 2)
metadata_cmd = 'python -m build --quiet --metadata'
if os.environ.get('DOC_NO_ISOLATION'):
metadata_cmd += ' --no-isolation'
metadata = subprocess.check_output(
metadata_cmd, shell=True, encoding='utf-8', cwd=trytond_dir).strip()
metadata = json.loads(metadata)
major_version, minor_version, _ = metadata['version'].split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
if minor_version % 2:
+1
View File
@@ -1,2 +1,3 @@
build
sphinx_book_theme
sphinx_copybutton
+4 -4
View File
@@ -1,7 +1,7 @@
Copyright (C) 2008-2025 Cédric Krier.
Copyright (C) 2008-2013 Bertrand Chenal.
Copyright (C) 2008-2025 B2CK SPRL.
Copyright (C) 2004-2008 Tiny SPRL.
Copyright (C) 2008-2025 Cédric Krier <cedric.krier@b2ck.com>
Copyright (C) 2008-2013 Bertrand Chenal <bertrand.chenal@b2ck.com>
Copyright (C) 2008-2025 B2CK SRL
Copyright (C) 2004-2008 Tiny SPRL
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-6
View File
@@ -1,6 +0,0 @@
include CHANGELOG
include COPYRIGHT
include LICENSE
include README.rst
include icons/LICENSE
graft doc
+10 -12
View File
@@ -15,8 +15,8 @@ else:
def get_info():
import configparser
import json
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
@@ -24,17 +24,15 @@ def get_info():
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name', '--description'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'], info['description'] = (
result.stdout.decode('utf-8').strip().splitlines())
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
major_version, minor_version, _ = version.split('.', 2)
metadata_cmd = 'python -m build --quiet --metadata'
if os.environ.get('DOC_NO_ISOLATION'):
metadata_cmd += ' --no-isolation'
metadata = subprocess.check_output(
metadata_cmd, shell=True, encoding='utf-8', cwd=module_dir).strip()
metadata = json.loads(metadata)
info['name'] = metadata['name']
info['description'] = metadata['summary']
major_version, minor_version, _ = metadata['version'].split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
if minor_version % 2:
+1
View File
@@ -1,2 +1,3 @@
build
sphinx_book_theme
sphinx_copybutton
+63
View File
@@ -0,0 +1,63 @@
[build-system]
requires = ['hatchling >= 1', 'hatch-tryton']
build-backend = 'hatchling.build'
[project]
name = 'trytond_account'
dynamic = ['version', 'dependencies', 'optional-dependencies', 'authors', 'readme']
requires-python = '>=3.9'
maintainers = [
{name = "Tryton", email = "foundation@tryton.org"},
]
description = "Accounting for Tryton"
license = 'GPL-3.0-or-later'
license-files = ['LICENSE', 'icons/LICENSE', 'COPYRIGHT']
keywords = ["tryton", "accounting"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Plugins",
"Framework :: Tryton",
"Topic :: Office/Business",
"Topic :: Office/Business :: Financial :: Accounting",
"Topic :: Software Development :: Libraries :: Python Modules",
]
[project.entry-points.'trytond.modules']
account = 'trytond.modules.account'
[project.urls]
homepage = "https://www.tryton.org/"
documentation = "https://docs.tryton.org/modules-account/"
changelog = "https://docs.tryton.org/modules-account/releases.html"
forum = "https://www.tryton.org/forum"
issues = "https://bugs.tryton.org/tryton"
funding = "https://www.tryton.org/donate"
[tool.hatch.build]
include = [
'**/tryton.cfg',
'**/*.py',
'**/*.xml',
'view/**/*.xml',
'locale/**/*.po',
'**/*.fodt',
'icons/**/*.svg',
'tests/**/*.rst',
'tests/**/*.json',
]
exclude = ['doc']
[tool.hatch.build.targets.wheel.sources]
"" = "trytond/modules/account"
[tool.hatch.metadata.hooks.tryton]
dependencies = [
'python-dateutil',
'python-sql >= 0.7',
'simpleeval',
]
copyright = 'COPYRIGHT'
readme = 'README.rst'
[tool.hatch.metadata.hooks.tryton.tryton-optional-dependencies]
test = ['proteus']
-132
View File
@@ -1,132 +0,0 @@
#!/usr/bin/env python3
# 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 re
from configparser import ConfigParser
from setuptools import find_packages, setup
def read(fname):
content = io.open(
os.path.join(os.path.dirname(__file__), fname),
'r', encoding='utf-8').read()
content = re.sub(
r'(?m)^\.\. toctree::\r?\n((^$|^\s.*$)\r?\n)*', '', content)
return content
def get_require_version(name):
require = '%s >= %s.%s, < %s.%s'
require %= (name, major_version, minor_version,
major_version, minor_version + 1)
return require
config = ConfigParser()
config.read_file(open(os.path.join(os.path.dirname(__file__), 'tryton.cfg')))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
if key in info:
info[key] = info[key].strip().splitlines()
version = info.get('version', '0.0.1')
major_version, minor_version, _ = version.split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
name = 'trytond_account'
if minor_version % 2:
download_url = ''
else:
download_url = 'http://downloads.tryton.org/%s.%s/' % (
major_version, minor_version)
requires = ['python-dateutil', 'python-sql >= 0.7', 'simpleeval']
for dep in info.get('depends', []):
if not re.match(r'(ir|res)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
requires.append(get_require_version('trytond'))
tests_require = [get_require_version('proteus')]
setup(name=name,
version=version,
description='Tryton module for accounting',
long_description=read('README.rst'),
author='Tryton',
author_email='foundation@tryton.org',
url='http://www.tryton.org/',
download_url=download_url,
project_urls={
"Bug Tracker": 'https://bugs.tryton.org/',
"Documentation": 'https://docs.tryton.org/modules-account/',
"Forum": 'https://www.tryton.org/forum',
"Source Code": 'https://code.tryton.org/tryton',
},
keywords='tryton account',
package_dir={'trytond.modules.account': '.'},
packages=(
['trytond.modules.account']
+ ['trytond.modules.account.%s' % p for p in find_packages()]
),
package_data={
'trytond.modules.account': (info.get('xml', [])
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.fodt',
'icons/*.svg', 'tests/*.rst', 'tests/*.json']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Framework :: Tryton',
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Intended Audience :: Legal Industry',
'License :: OSI Approved :: '
'GNU General Public License v3 or later (GPLv3+)',
'Natural Language :: Bulgarian',
'Natural Language :: Catalan',
'Natural Language :: Chinese (Simplified)',
'Natural Language :: Czech',
'Natural Language :: Dutch',
'Natural Language :: English',
'Natural Language :: Finnish',
'Natural Language :: French',
'Natural Language :: German',
'Natural Language :: Hungarian',
'Natural Language :: Indonesian',
'Natural Language :: Italian',
'Natural Language :: Persian',
'Natural Language :: Polish',
'Natural Language :: Portuguese (Brazilian)',
'Natural Language :: Romanian',
'Natural Language :: Russian',
'Natural Language :: Slovenian',
'Natural Language :: Spanish',
'Natural Language :: Turkish',
'Natural Language :: Ukrainian',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Office/Business',
'Topic :: Office/Business :: Financial :: Accounting',
],
license='GPL-3',
python_requires='>=3.9',
install_requires=requires,
extras_require={
'test': tests_require,
},
zip_safe=False,
entry_points="""
[trytond.modules]
account = trytond.modules.account
""",
)
+2 -2
View File
@@ -2,10 +2,10 @@
envlist = {py39,py310,py311,py312,py313}-{sqlite,postgresql}
[testenv]
usedevelop = true
changedir = {toxworkdir}
extras = test
commands =
coverage run --omit=*/tests/* -m xmlrunner discover -s tests {posargs}
coverage run --source=trytond.modules.account --omit=*/tests/* -m xmlrunner discover -s trytond.modules.account {posargs}
commands_post =
coverage report
coverage xml
+4 -4
View File
@@ -1,7 +1,7 @@
Copyright (C) 2012-2025 Nicolas Évrard.
Copyright (C) 2012-2025 Cédric Krier.
Copyright (C) 2012-2013 Bertrand Chenal.
Copyright (C) 2012-2025 B2CK SPRL.
Copyright (C) 2012-2025 Nicolas Évrard <nicolas.evrard@b2ck.com>
Copyright (C) 2012-2025 Cédric Krier <cedric.krier@b2ck.com>
Copyright (C) 2012-2013 Bertrand Chenal <bertrand.chenal@b2ck.com>
Copyright (C) 2012-2025 B2CK SRL
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-6
View File
@@ -1,6 +0,0 @@
include CHANGELOG
include COPYRIGHT
include LICENSE
include README.rst
include icons/LICENSE
graft doc
+10 -12
View File
@@ -15,8 +15,8 @@ else:
def get_info():
import configparser
import json
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
@@ -24,17 +24,15 @@ def get_info():
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name', '--description'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'], info['description'] = (
result.stdout.decode('utf-8').strip().splitlines())
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
major_version, minor_version, _ = version.split('.', 2)
metadata_cmd = 'python -m build --quiet --metadata'
if os.environ.get('DOC_NO_ISOLATION'):
metadata_cmd += ' --no-isolation'
metadata = subprocess.check_output(
metadata_cmd, shell=True, encoding='utf-8', cwd=module_dir).strip()
metadata = json.loads(metadata)
info['name'] = metadata['name']
info['description'] = metadata['summary']
major_version, minor_version, _ = metadata['version'].split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
if minor_version % 2:
@@ -1,2 +1,3 @@
build
sphinx_book_theme
sphinx_copybutton
+62
View File
@@ -0,0 +1,62 @@
[build-system]
requires = ['hatchling >= 1', 'hatch-tryton']
build-backend = 'hatchling.build'
[project]
name = 'trytond_account_asset'
dynamic = ['version', 'dependencies', 'optional-dependencies', 'authors', 'readme']
requires-python = '>=3.9'
maintainers = [
{name = "Tryton", email = "foundation@tryton.org"},
]
description = "Assets management for Tryton"
license = 'GPL-3.0-or-later'
license-files = ['LICENSE', 'icons/LICENSE', 'COPYRIGHT']
keywords = ["tryton", "accounting", "asset"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Plugins",
"Framework :: Tryton",
"Topic :: Office/Business",
"Topic :: Office/Business :: Financial :: Accounting",
"Topic :: Software Development :: Libraries :: Python Modules",
]
[project.entry-points.'trytond.modules']
account_asset = 'trytond.modules.account_asset'
[project.urls]
homepage = "https://www.tryton.org/"
documentation = "https://docs.tryton.org/modules-account-asset/"
changelog = "https://docs.tryton.org/modules-account-asset/releases.html"
forum = "https://www.tryton.org/forum"
issues = "https://bugs.tryton.org/tryton"
funding = "https://www.tryton.org/donate"
[tool.hatch.build]
include = [
'**/tryton.cfg',
'**/*.py',
'**/*.xml',
'view/**/*.xml',
'locale/**/*.po',
'**/*.fodt',
'icons/**/*.svg',
'tests/**/*.rst',
'tests/**/*.json',
]
exclude = ['doc']
[tool.hatch.build.targets.wheel.sources]
"" = "trytond/modules/account_asset"
[tool.hatch.metadata.hooks.tryton]
dependencies = [
'python-dateutil',
'python-sql',
]
copyright = 'COPYRIGHT'
readme = 'README.rst'
[tool.hatch.metadata.hooks.tryton.tryton-optional-dependencies]
test = ['proteus']
-134
View File
@@ -1,134 +0,0 @@
#!/usr/bin/env python3
# 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 re
from configparser import ConfigParser
from setuptools import find_packages, setup
def read(fname):
content = io.open(
os.path.join(os.path.dirname(__file__), fname),
'r', encoding='utf-8').read()
content = re.sub(
r'(?m)^\.\. toctree::\r?\n((^$|^\s.*$)\r?\n)*', '', content)
return content
def get_require_version(name):
require = '%s >= %s.%s, < %s.%s'
require %= (name, major_version, minor_version,
major_version, minor_version + 1)
return require
config = ConfigParser()
config.read_file(open(os.path.join(os.path.dirname(__file__), 'tryton.cfg')))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
if key in info:
info[key] = info[key].strip().splitlines()
version = info.get('version', '0.0.1')
major_version, minor_version, _ = version.split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
name = 'trytond_account_asset'
if minor_version % 2:
download_url = ''
else:
download_url = 'http://downloads.tryton.org/%s.%s/' % (
major_version, minor_version)
requires = ['python-dateutil', 'python-sql']
for dep in info.get('depends', []):
if not re.match(r'(ir|res)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
requires.append(get_require_version('trytond'))
tests_require = [get_require_version('proteus'),
get_require_version('trytond_purchase')]
setup(name=name,
version=version,
description='Tryton module for assets management',
long_description=read('README.rst'),
author='Tryton',
author_email='foundation@tryton.org',
url='http://www.tryton.org/',
download_url=download_url,
project_urls={
"Bug Tracker": 'https://bugs.tryton.org/',
"Documentation": (
'https://docs.tryton.org/latest/modules-account-asset'),
"Forum": 'https://www.tryton.org/forum',
"Source Code": 'https://code.tryton.org/tryton',
},
keywords='tryton account asset',
package_dir={'trytond.modules.account_asset': '.'},
packages=(
['trytond.modules.account_asset']
+ ['trytond.modules.account_asset.%s' % p for p in find_packages()]
),
package_data={
'trytond.modules.account_asset': (info.get('xml', [])
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', 'tests/*.rst',
'*.fodt']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Framework :: Tryton',
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Intended Audience :: Legal Industry',
'License :: OSI Approved :: '
'GNU General Public License v3 or later (GPLv3+)',
'Natural Language :: Bulgarian',
'Natural Language :: Catalan',
'Natural Language :: Chinese (Simplified)',
'Natural Language :: Czech',
'Natural Language :: Dutch',
'Natural Language :: English',
'Natural Language :: Finnish',
'Natural Language :: French',
'Natural Language :: German',
'Natural Language :: Hungarian',
'Natural Language :: Indonesian',
'Natural Language :: Italian',
'Natural Language :: Persian',
'Natural Language :: Polish',
'Natural Language :: Portuguese (Brazilian)',
'Natural Language :: Romanian',
'Natural Language :: Russian',
'Natural Language :: Slovenian',
'Natural Language :: Spanish',
'Natural Language :: Turkish',
'Natural Language :: Ukrainian',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Office/Business',
'Topic :: Office/Business :: Financial :: Accounting',
],
license='GPL-3',
python_requires='>=3.9',
install_requires=requires,
extras_require={
'test': tests_require,
},
zip_safe=False,
entry_points="""
[trytond.modules]
account_asset = trytond.modules.account_asset
""",
)
+2 -2
View File
@@ -2,10 +2,10 @@
envlist = {py39,py310,py311,py312,py313}-{sqlite,postgresql}
[testenv]
usedevelop = true
changedir = {toxworkdir}
extras = test
commands =
coverage run --omit=*/tests/* -m xmlrunner discover -s tests {posargs}
coverage run --source=trytond.modules.account_asset --omit=*/tests/* -m xmlrunner discover -s trytond.modules.account_asset {posargs}
commands_post =
coverage report
coverage xml
+3 -3
View File
@@ -1,6 +1,6 @@
Copyright (C) 2008-2025 Cédric Krier.
Copyright (C) 2008-2011 Bertrand Chenal.
Copyright (C) 2008-2025 B2CK SPRL.
Copyright (C) 2008-2025 Cédric Krier <cedric.krier@b2ck.com>
Copyright (C) 2008-2011 Bertrand Chenal <bertrand.chenal@b2ck.com>
Copyright (C) 2008-2025 B2CK SRL
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-6
View File
@@ -1,6 +0,0 @@
include CHANGELOG
include COPYRIGHT
include LICENSE
include README.rst
include icons/LICENSE
graft doc
+10 -12
View File
@@ -15,8 +15,8 @@ else:
def get_info():
import configparser
import json
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
@@ -24,17 +24,15 @@ def get_info():
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name', '--description'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'], info['description'] = (
result.stdout.decode('utf-8').strip().splitlines())
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
major_version, minor_version, _ = version.split('.', 2)
metadata_cmd = 'python -m build --quiet --metadata'
if os.environ.get('DOC_NO_ISOLATION'):
metadata_cmd += ' --no-isolation'
metadata = subprocess.check_output(
metadata_cmd, shell=True, encoding='utf-8', cwd=module_dir).strip()
metadata = json.loads(metadata)
info['name'] = metadata['name']
info['description'] = metadata['summary']
major_version, minor_version, _ = metadata['version'].split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
if minor_version % 2:
@@ -1,2 +1,3 @@
build
sphinx_book_theme
sphinx_copybutton
+63
View File
@@ -0,0 +1,63 @@
[build-system]
requires = ['hatchling >= 1', 'hatch-tryton']
build-backend = 'hatchling.build'
[project]
name = 'trytond_account_be'
dynamic = ['version', 'dependencies', 'optional-dependencies', 'authors', 'readme']
requires-python = '>=3.9'
maintainers = [
{name = "Tryton", email = "foundation@tryton.org"},
]
description = "Belgian chart of accounts for Tryton"
license = 'GPL-3.0-or-later'
license-files = ['LICENSE', 'icons/LICENSE', 'COPYRIGHT']
keywords = ["tryton", "accounting", "coa", "belgian"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Plugins",
"Framework :: Tryton",
"Natural Language :: Dutch",
"Natural Language :: French",
"Topic :: Office/Business",
"Topic :: Office/Business :: Financial :: Accounting",
"Topic :: Software Development :: Libraries :: Python Modules",
]
[project.entry-points.'trytond.modules']
account_be = 'trytond.modules.account_be'
[project.urls]
homepage = "https://www.tryton.org/"
documentation = "https://docs.tryton.org/modules-account-be/"
changelog = "https://docs.tryton.org/modules-account-be/releases.html"
forum = "https://www.tryton.org/forum"
issues = "https://bugs.tryton.org/tryton"
funding = "https://www.tryton.org/donate"
[tool.hatch.build]
include = [
'**/tryton.cfg',
'**/*.py',
'**/*.xml',
'view/**/*.xml',
'locale/**/*.po',
'**/*.fodt',
'icons/**/*.svg',
'tests/**/*.rst',
'tests/**/*.json',
]
exclude = ['doc']
[tool.hatch.build.targets.wheel.sources]
"" = "trytond/modules/account_be"
[tool.hatch.metadata.hooks.tryton]
dependencies = [
'python-stdnum >= 2.2',
]
copyright = 'COPYRIGHT'
readme = 'README.rst'
[tool.hatch.metadata.hooks.tryton.tryton-optional-dependencies]
test = []
-116
View File
@@ -1,116 +0,0 @@
#!/usr/bin/env python3
# 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 re
from configparser import ConfigParser
from setuptools import find_packages, setup
def read(fname):
content = io.open(
os.path.join(os.path.dirname(__file__), fname),
'r', encoding='utf-8').read()
content = re.sub(
r'(?m)^\.\. toctree::\r?\n((^$|^\s.*$)\r?\n)*', '', content)
return content
def get_require_version(name):
require = '%s >= %s.%s, < %s.%s'
require %= (name, major_version, minor_version,
major_version, minor_version + 1)
return require
config = ConfigParser()
config.read_file(open(os.path.join(os.path.dirname(__file__), 'tryton.cfg')))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
if key in info:
info[key] = info[key].strip().splitlines()
version = info.get('version', '0.0.1')
major_version, minor_version, _ = version.split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
name = 'trytond_account_be'
if minor_version % 2:
download_url = ''
else:
download_url = 'http://downloads.tryton.org/%s.%s/' % (
major_version, minor_version)
requires = ['python-stdnum >= 2.2']
for dep in info.get('depends', []):
if not re.match(r'(ir|res)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
requires.append(get_require_version('trytond'))
tests_require = [
get_require_version('trytond_account_invoice'),
get_require_version('trytond_account_payment'),
get_require_version('trytond_account_statement_rule'),
]
setup(name=name,
version=version,
description='Tryton module with Belgian chart of accounts',
long_description=read('README.rst'),
author='Tryton',
author_email='foundation@tryton.org',
url='http://www.tryton.org/',
download_url=download_url,
project_urls={
"Bug Tracker": 'https://bugs.tryton.org/',
"Documentation": 'https://docs.tryton.org/latest/modules-account-be',
"Forum": 'https://www.tryton.org/forum',
"Source Code": 'https://code.tryton.org/tryton',
},
keywords='tryton account chart belgian',
package_dir={'trytond.modules.account_be': '.'},
packages=(
['trytond.modules.account_be']
+ ['trytond.modules.account_be.%s' % p for p in find_packages()]
),
package_data={
'trytond.modules.account_be': (info.get('xml', [])
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Framework :: Tryton',
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Intended Audience :: Legal Industry',
'License :: OSI Approved :: '
'GNU General Public License v3 or later (GPLv3+)',
'Natural Language :: Dutch',
'Natural Language :: French',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Office/Business',
'Topic :: Office/Business :: Financial :: Accounting',
],
license='GPL-3',
python_requires='>=3.9',
install_requires=requires,
extras_require={
'test': tests_require,
},
zip_safe=False,
entry_points="""
[trytond.modules]
account_be = trytond.modules.account_be
""",
)
+2 -2
View File
@@ -2,10 +2,10 @@
envlist = {py39,py310,py311,py312,py313}-{sqlite,postgresql}
[testenv]
usedevelop = true
changedir = {toxworkdir}
extras = test
commands =
coverage run --omit=*/tests/* -m xmlrunner discover -s tests {posargs}
coverage run --source=trytond.modules.account_be --omit=*/tests/* -m xmlrunner discover -s trytond.modules.account_be {posargs}
commands_post =
coverage report
coverage xml
+3 -3
View File
@@ -1,8 +1,8 @@
Copyright (C) 2021-2025 B2CK
Copyright (C) 2021-2025 Cédric Krier
Copyright (C) 2021-2025 B2CK SRL
Copyright (C) 2021-2025 Cédric Krier <cedric.krier@b2ck.com>
Copyright (C) 2020-2021 David Harper
Copyright (C) 2019 Adrián Bernardi
Copyright (C) 2016 Sergi Almacellas Abellana
Copyright (C) 2016 Sergi Almacellas Abellana <sergi@kopen.es>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-6
View File
@@ -1,6 +0,0 @@
include CHANGELOG
include COPYRIGHT
include LICENSE
include README.rst
include icons/LICENSE
graft doc
+10 -12
View File
@@ -15,8 +15,8 @@ else:
def get_info():
import configparser
import json
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
@@ -24,17 +24,15 @@ def get_info():
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name', '--description'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'], info['description'] = (
result.stdout.decode('utf-8').strip().splitlines())
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
major_version, minor_version, _ = version.split('.', 2)
metadata_cmd = 'python -m build --quiet --metadata'
if os.environ.get('DOC_NO_ISOLATION'):
metadata_cmd += ' --no-isolation'
metadata = subprocess.check_output(
metadata_cmd, shell=True, encoding='utf-8', cwd=module_dir).strip()
metadata = json.loads(metadata)
info['name'] = metadata['name']
info['description'] = metadata['summary']
major_version, minor_version, _ = metadata['version'].split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
if minor_version % 2:
@@ -1,2 +1,3 @@
build
sphinx_book_theme
sphinx_copybutton
+59
View File
@@ -0,0 +1,59 @@
[build-system]
requires = ['hatchling >= 1', 'hatch-tryton']
build-backend = 'hatchling.build'
[project]
name = 'trytond_account_budget'
dynamic = ['version', 'dependencies', 'optional-dependencies', 'authors', 'readme']
requires-python = '>=3.9'
maintainers = [
{name = "Tryton", email = "foundation@tryton.org"},
]
description = "Accounting budget for Tryton"
license = 'GPL-3.0-or-later'
license-files = ['LICENSE', 'icons/LICENSE', 'COPYRIGHT']
keywords = ["tryton", "accounting", "budget"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Plugins",
"Framework :: Tryton",
"Topic :: Office/Business",
"Topic :: Office/Business :: Financial :: Accounting",
"Topic :: Software Development :: Libraries :: Python Modules",
]
[project.entry-points.'trytond.modules']
account_budget = 'trytond.modules.account_budget'
[project.urls]
homepage = "https://www.tryton.org/"
documentation = "https://docs.tryton.org/modules-account-budget/"
changelog = "https://docs.tryton.org/modules-account-budget/releases.html"
forum = "https://www.tryton.org/forum"
issues = "https://bugs.tryton.org/tryton"
funding = "https://www.tryton.org/donate"
[tool.hatch.build]
include = [
'**/tryton.cfg',
'**/*.py',
'**/*.xml',
'view/**/*.xml',
'locale/**/*.po',
'**/*.fodt',
'icons/**/*.svg',
'tests/**/*.rst',
'tests/**/*.json',
]
exclude = ['doc']
[tool.hatch.build.targets.wheel.sources]
"" = "trytond/modules/account_budget"
[tool.hatch.metadata.hooks.tryton]
dependencies = []
copyright = 'COPYRIGHT'
readme = 'README.rst'
[tool.hatch.metadata.hooks.tryton.tryton-optional-dependencies]
test = ['proteus']
-134
View File
@@ -1,134 +0,0 @@
#!/usr/bin/env python3
# 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 re
from configparser import ConfigParser
from setuptools import find_packages, setup
def read(fname):
content = io.open(
os.path.join(os.path.dirname(__file__), fname),
'r', encoding='utf-8').read()
content = re.sub(
r'(?m)^\.\. toctree::\r?\n((^$|^\s.*$)\r?\n)*', '', content)
return content
def get_require_version(name):
require = '%s >= %s.%s, < %s.%s'
require %= (name, major_version, minor_version,
major_version, minor_version + 1)
return require
config = ConfigParser()
config.read_file(open(os.path.join(os.path.dirname(__file__), 'tryton.cfg')))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
if key in info:
info[key] = info[key].strip().splitlines()
version = info.get('version', '0.0.1')
major_version, minor_version, _ = version.split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
name = 'trytond_account_budget'
if minor_version % 2:
download_url = ''
else:
download_url = 'http://downloads.tryton.org/%s.%s/' % (
major_version, minor_version)
requires = []
for dep in info.get('depends', []):
if not re.match(r'(ir|res)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
requires.append(get_require_version('trytond'))
tests_require = [get_require_version('proteus')]
setup(name=name,
version=version,
description='Tryton module that allows budgets to be setup for accounts',
long_description=read('README.rst'),
author='Tryton',
author_email='foundation@tryton.org',
url='http://www.tryton.org/',
download_url=download_url,
project_urls={
"Bug Tracker": 'https://bugs.tryton.org/',
"Documentation":
'https://docs.tryton.org/modules-account-budget',
"Forum": 'https://www.tryton.org/forum',
"Source Code": 'https://code.tryton.org/tryton',
},
keywords='tryton account budget',
package_dir={'trytond.modules.account_budget': '.'},
packages=(
['trytond.modules.account_budget']
+ ['trytond.modules.account_budget.%s' % p
for p in find_packages()]
),
package_data={
'trytond.modules.account_budget': (info.get('xml', [])
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.fodt',
'icons/*.svg', 'tests/*.rst']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Framework :: Tryton',
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Intended Audience :: Legal Industry',
'License :: OSI Approved :: '
'GNU General Public License v3 or later (GPLv3+)',
'Natural Language :: Bulgarian',
'Natural Language :: Catalan',
'Natural Language :: Chinese (Simplified)',
'Natural Language :: Czech',
'Natural Language :: Dutch',
'Natural Language :: English',
'Natural Language :: Finnish',
'Natural Language :: French',
'Natural Language :: German',
'Natural Language :: Hungarian',
'Natural Language :: Indonesian',
'Natural Language :: Italian',
'Natural Language :: Persian',
'Natural Language :: Polish',
'Natural Language :: Portuguese (Brazilian)',
'Natural Language :: Romanian',
'Natural Language :: Russian',
'Natural Language :: Slovenian',
'Natural Language :: Spanish',
'Natural Language :: Turkish',
'Natural Language :: Ukrainian',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Office/Business',
'Topic :: Office/Business :: Financial :: Accounting',
],
license='GPL-3',
python_requires='>=3.9',
install_requires=requires,
extras_require={
'test': tests_require,
},
zip_safe=False,
entry_points="""
[trytond.modules]
account_budget = trytond.modules.account_budget
""", # noqa: E501
)
+2 -2
View File
@@ -2,10 +2,10 @@
envlist = {py39,py310,py311,py312,py313}-{sqlite,postgresql}
[testenv]
usedevelop = true
changedir = {toxworkdir}
extras = test
commands =
coverage run --omit=*/tests/* -m xmlrunner discover -s tests {posargs}
coverage run --source=trytond.modules.account_budget --omit=*/tests/* -m xmlrunner discover -s trytond.modules.account_budget {posargs}
commands_post =
coverage report
coverage xml
+2 -2
View File
@@ -1,5 +1,5 @@
Copyright (C) 2019-2025 Cédric Krier
Copyright (C) 2019-2025 B2CK
Copyright (C) 2019-2025 Cédric Krier <cedric.krier@b2ck.com>
Copyright (C) 2019-2025 B2CK SRL
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1,6 +0,0 @@
include CHANGELOG
include COPYRIGHT
include LICENSE
include README.rst
include icons/LICENSE
graft doc
+10 -12
View File
@@ -15,8 +15,8 @@ else:
def get_info():
import configparser
import json
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
@@ -24,17 +24,15 @@ def get_info():
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name', '--description'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'], info['description'] = (
result.stdout.decode('utf-8').strip().splitlines())
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
major_version, minor_version, _ = version.split('.', 2)
metadata_cmd = 'python -m build --quiet --metadata'
if os.environ.get('DOC_NO_ISOLATION'):
metadata_cmd += ' --no-isolation'
metadata = subprocess.check_output(
metadata_cmd, shell=True, encoding='utf-8', cwd=module_dir).strip()
metadata = json.loads(metadata)
info['name'] = metadata['name']
info['description'] = metadata['summary']
major_version, minor_version, _ = metadata['version'].split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
if minor_version % 2:
@@ -1,2 +1,3 @@
build
sphinx_book_theme
sphinx_copybutton
@@ -0,0 +1,59 @@
[build-system]
requires = ['hatchling >= 1', 'hatch-tryton']
build-backend = 'hatchling.build'
[project]
name = 'trytond_account_cash_rounding'
dynamic = ['version', 'dependencies', 'optional-dependencies', 'authors', 'readme']
requires-python = '>=3.9'
maintainers = [
{name = "Tryton", email = "foundation@tryton.org"},
]
description = "Round cash amount in Tryton"
license = 'GPL-3.0-or-later'
license-files = ['LICENSE', 'icons/LICENSE', 'COPYRIGHT']
keywords = ["tryton", "accounting", "cash", "rounding"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Plugins",
"Framework :: Tryton",
"Topic :: Office/Business",
"Topic :: Office/Business :: Financial :: Accounting",
"Topic :: Software Development :: Libraries :: Python Modules",
]
[project.entry-points.'trytond.modules']
account_cash_rounding = 'trytond.modules.account_cash_rounding'
[project.urls]
homepage = "https://www.tryton.org/"
documentation = "https://docs.tryton.org/modules-account-cash-rounding/"
changelog = "https://docs.tryton.org/modules-account-cash-rounding/releases.html"
forum = "https://www.tryton.org/forum"
issues = "https://bugs.tryton.org/tryton"
funding = "https://www.tryton.org/donate"
[tool.hatch.build]
include = [
'**/tryton.cfg',
'**/*.py',
'**/*.xml',
'view/**/*.xml',
'locale/**/*.po',
'**/*.fodt',
'icons/**/*.svg',
'tests/**/*.rst',
'tests/**/*.json',
]
exclude = ['doc']
[tool.hatch.build.targets.wheel.sources]
"" = "trytond/modules/account_cash_rounding"
[tool.hatch.metadata.hooks.tryton]
dependencies = []
copyright = 'COPYRIGHT'
readme = 'README.rst'
[tool.hatch.metadata.hooks.tryton.tryton-optional-dependencies]
test = ['proteus']
-136
View File
@@ -1,136 +0,0 @@
#!/usr/bin/env python3
# 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 re
from configparser import ConfigParser
from setuptools import find_packages, setup
def read(fname, slice=None):
content = io.open(
os.path.join(os.path.dirname(__file__), fname),
'r', encoding='utf-8').read()
content = re.sub(
r'(?m)^\.\. toctree::\r?\n((^$|^\s.*$)\r?\n)*', '', content)
return content
def get_require_version(name):
require = '%s >= %s.%s, < %s.%s'
require %= (name, major_version, minor_version,
major_version, minor_version + 1)
return require
config = ConfigParser()
config.read_file(open(os.path.join(os.path.dirname(__file__), 'tryton.cfg')))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
if key in info:
info[key] = info[key].strip().splitlines()
version = info.get('version', '0.0.1')
major_version, minor_version, _ = version.split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
name = 'trytond_account_cash_rounding'
if minor_version % 2:
download_url = ''
else:
download_url = 'http://downloads.tryton.org/%s.%s/' % (
major_version, minor_version)
requires = []
for dep in info.get('depends', []):
if not re.match(r'(ir|res)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
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))
setup(name=name,
version=version,
description='Tryton module to round cash amount',
long_description=read('README.rst'),
author='Tryton',
author_email='foundation@tryton.org',
url='http://www.tryton.org/',
download_url=download_url,
project_urls={
"Bug Tracker": 'https://bugs.tryton.org/',
"Documentation": (
'https://docs.tryton.org/latest/modules-account-cash-rounding'),
"Forum": 'https://www.tryton.org/forum',
"Source Code": 'https://code.tryton.org/tryton',
},
keywords='tryton account cash rounding',
package_dir={'trytond.modules.account_cash_rounding': '.'},
packages=(
['trytond.modules.account_cash_rounding']
+ ['trytond.modules.account_cash_rounding.%s' % p
for p in find_packages()]
),
package_data={
'trytond.modules.account_cash_rounding': (info.get('xml', [])
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.fodt',
'icons/*.svg', 'tests/*.rst']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Framework :: Tryton',
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Intended Audience :: Legal Industry',
'License :: OSI Approved :: '
'GNU General Public License v3 or later (GPLv3+)',
'Natural Language :: Bulgarian',
'Natural Language :: Catalan',
'Natural Language :: Chinese (Simplified)',
'Natural Language :: Czech',
'Natural Language :: Dutch',
'Natural Language :: English',
'Natural Language :: Finnish',
'Natural Language :: French',
'Natural Language :: German',
'Natural Language :: Hungarian',
'Natural Language :: Indonesian',
'Natural Language :: Italian',
'Natural Language :: Persian',
'Natural Language :: Polish',
'Natural Language :: Portuguese (Brazilian)',
'Natural Language :: Romanian',
'Natural Language :: Russian',
'Natural Language :: Slovenian',
'Natural Language :: Spanish',
'Natural Language :: Turkish',
'Natural Language :: Ukrainian',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Office/Business',
'Topic :: Office/Business :: Financial :: Accounting',
],
license='GPL-3',
python_requires='>=3.9',
install_requires=requires,
extras_require={
'test': tests_require,
},
zip_safe=False,
entry_points="""
[trytond.modules]
account_cash_rounding = trytond.modules.account_cash_rounding
""",
)
+2 -2
View File
@@ -2,10 +2,10 @@
envlist = {py39,py310,py311,py312,py313}-{sqlite,postgresql}
[testenv]
usedevelop = true
changedir = {toxworkdir}
extras = test
commands =
coverage run --omit=*/tests/* -m xmlrunner discover -s tests {posargs}
coverage run --source=trytond.modules.account_cash_rounding --omit=*/tests/* -m xmlrunner discover -s trytond.modules.account_cash_rounding {posargs}
commands_post =
coverage report
coverage xml
+2 -2
View File
@@ -1,6 +1,6 @@
Copyright (C) 2021 NaN-tic
Copyright (C) 2022-2025 B2CK
Copyright (C) 2022-2025 Cédric Krier
Copyright (C) 2022-2025 B2CK SRL
Copyright (C) 2022-2025 Cédric Krier <cedric.krier@b2ck.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1,6 +0,0 @@
include CHANGELOG
include COPYRIGHT
include LICENSE
include README.rst
include icons/LICENSE
graft doc
-1
View File
@@ -1 +0,0 @@
doc/index.rst
+1
View File
@@ -0,0 +1 @@
doc/index.rst
+10 -12
View File
@@ -15,8 +15,8 @@ else:
def get_info():
import configparser
import json
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
@@ -24,17 +24,15 @@ def get_info():
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name', '--description'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'], info['description'] = (
result.stdout.decode('utf-8').strip().splitlines())
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
major_version, minor_version, _ = version.split('.', 2)
metadata_cmd = 'python -m build --quiet --metadata'
if os.environ.get('DOC_NO_ISOLATION'):
metadata_cmd += ' --no-isolation'
metadata = subprocess.check_output(
metadata_cmd, shell=True, encoding='utf-8', cwd=module_dir).strip()
metadata = json.loads(metadata)
info['name'] = metadata['name']
info['description'] = metadata['summary']
major_version, minor_version, _ = metadata['version'].split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
if minor_version % 2:
@@ -1,2 +1,3 @@
build
sphinx_book_theme
sphinx_copybutton
@@ -0,0 +1,59 @@
[build-system]
requires = ['hatchling >= 1', 'hatch-tryton']
build-backend = 'hatchling.build'
[project]
name = 'trytond_account_consolidation'
dynamic = ['version', 'dependencies', 'optional-dependencies', 'authors', 'readme']
requires-python = '>=3.9'
maintainers = [
{name = "Tryton", email = "foundation@tryton.org"},
]
description = "Consolidation of the accounting of many companies in Tryton"
license = 'GPL-3.0-or-later'
license-files = ['LICENSE', 'icons/LICENSE', 'COPYRIGHT']
keywords = ["tryton", "accounting", "consolidation"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Plugins",
"Framework :: Tryton",
"Topic :: Office/Business",
"Topic :: Office/Business :: Financial :: Accounting",
"Topic :: Software Development :: Libraries :: Python Modules",
]
[project.entry-points.'trytond.modules']
account_consolidation = 'trytond.modules.account_consolidation'
[project.urls]
homepage = "https://www.tryton.org/"
documentation = "https://docs.tryton.org/modules-account-consolidation/"
changelog = "https://docs.tryton.org/modules-account-consolidation/releases.html"
forum = "https://www.tryton.org/forum"
issues = "https://bugs.tryton.org/tryton"
funding = "https://www.tryton.org/donate"
[tool.hatch.build]
include = [
'**/tryton.cfg',
'**/*.py',
'**/*.xml',
'view/**/*.xml',
'locale/**/*.po',
'**/*.fodt',
'icons/**/*.svg',
'tests/**/*.rst',
'tests/**/*.json',
]
exclude = ['doc']
[tool.hatch.build.targets.wheel.sources]
"" = "trytond/modules/account_consolidation"
[tool.hatch.metadata.hooks.tryton]
dependencies = []
copyright = 'COPYRIGHT'
readme = 'README.rst'
[tool.hatch.metadata.hooks.tryton.tryton-optional-dependencies]
test = ['proteus']
-137
View File
@@ -1,137 +0,0 @@
#!/usr/bin/env python3
# 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 re
from configparser import ConfigParser
from setuptools import find_packages, setup
def read(fname):
content = io.open(
os.path.join(os.path.dirname(__file__), fname),
'r', encoding='utf-8').read()
content = re.sub(
r'(?m)^\.\. toctree::\r?\n((^$|^\s.*$)\r?\n)*', '', content)
return content
def get_require_version(name):
require = '%s >= %s.%s, < %s.%s'
require %= (name, major_version, minor_version,
major_version, minor_version + 1)
return require
config = ConfigParser()
config.read_file(open(os.path.join(os.path.dirname(__file__), 'tryton.cfg')))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
if key in info:
info[key] = info[key].strip().splitlines()
version = info.get('version', '0.0.1')
major_version, minor_version, _ = version.split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
name = 'trytond_account_consolidation'
if minor_version % 2:
download_url = ''
else:
download_url = 'http://downloads.tryton.org/%s.%s/' % (
major_version, minor_version)
requires = []
for dep in info.get('depends', []):
if not re.match(r'(ir|res)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
requires.append(get_require_version('trytond'))
tests_require = [
get_require_version('proteus'),
get_require_version('trytond_account_invoice'),
]
setup(name=name,
version=version,
description="Tryton module consolidate accounting of many companies",
long_description=read('README.rst'),
author='Tryton',
author_email='foundation@tryton.org',
url='http://www.tryton.org/',
download_url=download_url,
project_urls={
"Bug Tracker": 'https://bugs.tryton.org/',
"Documentation": (
'https://docs.tryton.org/modules-account-consolidation'),
"Forum": 'https://www.tryton.org/forum',
"Source Code": 'https://code.tryton.org/tryton',
},
keywords='tryton account consolidation',
package_dir={'trytond.modules.account_consolidation': '.'},
packages=(
['trytond.modules.account_consolidation']
+ ['trytond.modules.account_consolidation.%s' % p
for p in find_packages()]
),
package_data={
'trytond.modules.account_consolidation': (info.get('xml', [])
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.fodt',
'icons/*.svg', 'tests/*.rst']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Framework :: Tryton',
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Intended Audience :: Legal Industry',
'License :: OSI Approved :: '
'GNU General Public License v3 or later (GPLv3+)',
'Natural Language :: Bulgarian',
'Natural Language :: Catalan',
'Natural Language :: Chinese (Simplified)',
'Natural Language :: Czech',
'Natural Language :: Dutch',
'Natural Language :: English',
'Natural Language :: Finnish',
'Natural Language :: French',
'Natural Language :: German',
'Natural Language :: Hungarian',
'Natural Language :: Indonesian',
'Natural Language :: Italian',
'Natural Language :: Persian',
'Natural Language :: Polish',
'Natural Language :: Portuguese (Brazilian)',
'Natural Language :: Romanian',
'Natural Language :: Russian',
'Natural Language :: Slovenian',
'Natural Language :: Spanish',
'Natural Language :: Turkish',
'Natural Language :: Ukrainian',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Office/Business',
'Topic :: Office/Business :: Financial :: Accounting',
],
license='GPL-3',
python_requires='>=3.9',
install_requires=requires,
extras_require={
'test': tests_require,
},
zip_safe=False,
entry_points="""
[trytond.modules]
account_consolidation = trytond.modules.account_consolidation
""", # noqa: E501
)
+2 -2
View File
@@ -2,10 +2,10 @@
envlist = {py39,py310,py311,py312,py313}-{sqlite,postgresql}
[testenv]
usedevelop = true
changedir = {toxworkdir}
extras = test
commands =
coverage run --omit=*/tests/* -m xmlrunner discover -s tests {posargs}
coverage run --source=trytond.modules.account_consolidation --omit=*/tests/* -m xmlrunner discover -s trytond.modules.account_consolidation {posargs}
commands_post =
coverage report
coverage xml
+2 -2
View File
@@ -1,5 +1,5 @@
Copyright (C) 2011-2025 Cédric Krier.
Copyright (C) 2011-2025 B2CK SPRL.
Copyright (C) 2011-2025 Cédric Krier <cedric.krier@b2ck.com>
Copyright (C) 2011-2025 B2CK SRL
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-6
View File
@@ -1,6 +0,0 @@
include CHANGELOG
include COPYRIGHT
include LICENSE
include README.rst
include icons/LICENSE
graft doc
+10 -12
View File
@@ -15,8 +15,8 @@ else:
def get_info():
import configparser
import json
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
@@ -24,17 +24,15 @@ def get_info():
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name', '--description'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'], info['description'] = (
result.stdout.decode('utf-8').strip().splitlines())
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
major_version, minor_version, _ = version.split('.', 2)
metadata_cmd = 'python -m build --quiet --metadata'
if os.environ.get('DOC_NO_ISOLATION'):
metadata_cmd += ' --no-isolation'
metadata = subprocess.check_output(
metadata_cmd, shell=True, encoding='utf-8', cwd=module_dir).strip()
metadata = json.loads(metadata)
info['name'] = metadata['name']
info['description'] = metadata['summary']
major_version, minor_version, _ = metadata['version'].split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
if minor_version % 2:
@@ -1,2 +1,3 @@
build
sphinx_book_theme
sphinx_copybutton
@@ -0,0 +1,59 @@
[build-system]
requires = ['hatchling >= 1', 'hatch-tryton']
build-backend = 'hatchling.build'
[project]
name = 'trytond_account_credit_limit'
dynamic = ['version', 'dependencies', 'optional-dependencies', 'authors', 'readme']
requires-python = '>=3.9'
maintainers = [
{name = "Tryton", email = "foundation@tryton.org"},
]
description = "Credit Limits for parties in Tryton"
license = 'GPL-3.0-or-later'
license-files = ['LICENSE', 'icons/LICENSE', 'COPYRIGHT']
keywords = ["tryton", "accounting", "credit limit"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Plugins",
"Framework :: Tryton",
"Topic :: Office/Business",
"Topic :: Office/Business :: Financial :: Accounting",
"Topic :: Software Development :: Libraries :: Python Modules",
]
[project.entry-points.'trytond.modules']
account_credit_limit = 'trytond.modules.account_credit_limit'
[project.urls]
homepage = "https://www.tryton.org/"
documentation = "https://docs.tryton.org/modules-account-credit-limit/"
changelog = "https://docs.tryton.org/modules-account-credit-limit/releases.html"
forum = "https://www.tryton.org/forum"
issues = "https://bugs.tryton.org/tryton"
funding = "https://www.tryton.org/donate"
[tool.hatch.build]
include = [
'**/tryton.cfg',
'**/*.py',
'**/*.xml',
'view/**/*.xml',
'locale/**/*.po',
'**/*.fodt',
'icons/**/*.svg',
'tests/**/*.rst',
'tests/**/*.json',
]
exclude = ['doc']
[tool.hatch.build.targets.wheel.sources]
"" = "trytond/modules/account_credit_limit"
[tool.hatch.metadata.hooks.tryton]
dependencies = []
copyright = 'COPYRIGHT'
readme = 'README.rst'
[tool.hatch.metadata.hooks.tryton.tryton-optional-dependencies]
test = []
-133
View File
@@ -1,133 +0,0 @@
#!/usr/bin/env python3
# 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 re
from configparser import ConfigParser
from setuptools import find_packages, setup
def read(fname):
content = io.open(
os.path.join(os.path.dirname(__file__), fname),
'r', encoding='utf-8').read()
content = re.sub(
r'(?m)^\.\. toctree::\r?\n((^$|^\s.*$)\r?\n)*', '', content)
return content
def get_require_version(name):
require = '%s >= %s.%s, < %s.%s'
require %= (name, major_version, minor_version,
major_version, minor_version + 1)
return require
config = ConfigParser()
config.read_file(open(os.path.join(os.path.dirname(__file__), 'tryton.cfg')))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
if key in info:
info[key] = info[key].strip().splitlines()
version = info.get('version', '0.0.1')
major_version, minor_version, _ = version.split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
name = 'trytond_account_credit_limit'
if minor_version % 2:
download_url = ''
else:
download_url = 'http://downloads.tryton.org/%s.%s/' % (
major_version, minor_version)
requires = []
for dep in info.get('depends', []):
if not re.match(r'(ir|res)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
requires.append(get_require_version('trytond'))
tests_require = [get_require_version('trytond_account_dunning')]
setup(name=name,
version=version,
description='Tryton module for account credit limit',
long_description=read('README.rst'),
author='Tryton',
author_email='foundation@tryton.org',
url='http://www.tryton.org/',
download_url=download_url,
project_urls={
"Bug Tracker": 'https://bugs.tryton.org/',
"Documentation": (
'https://docs.tryton.org/latest/modules-account-credit-limit'),
"Forum": 'https://www.tryton.org/forum',
"Source Code": 'https://code.tryton.org/tryton',
},
keywords='tryton account credit limit',
package_dir={'trytond.modules.account_credit_limit': '.'},
packages=(
['trytond.modules.account_credit_limit']
+ ['trytond.modules.account_credit_limit.%s' % p
for p in find_packages()]
),
package_data={
'trytond.modules.account_credit_limit': (info.get('xml', [])
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Framework :: Tryton',
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Intended Audience :: Legal Industry',
'License :: OSI Approved :: '
'GNU General Public License v3 or later (GPLv3+)',
'Natural Language :: Bulgarian',
'Natural Language :: Catalan',
'Natural Language :: Chinese (Simplified)',
'Natural Language :: Czech',
'Natural Language :: Dutch',
'Natural Language :: English',
'Natural Language :: Finnish',
'Natural Language :: French',
'Natural Language :: German',
'Natural Language :: Hungarian',
'Natural Language :: Indonesian',
'Natural Language :: Italian',
'Natural Language :: Persian',
'Natural Language :: Polish',
'Natural Language :: Portuguese (Brazilian)',
'Natural Language :: Romanian',
'Natural Language :: Russian',
'Natural Language :: Slovenian',
'Natural Language :: Spanish',
'Natural Language :: Turkish',
'Natural Language :: Ukrainian',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Office/Business',
'Topic :: Office/Business :: Financial :: Accounting',
],
license='GPL-3',
python_requires='>=3.9',
install_requires=requires,
extras_require={
'test': tests_require,
},
zip_safe=False,
entry_points="""
[trytond.modules]
account_credit_limit = trytond.modules.account_credit_limit
""",
)
+2 -2
View File
@@ -2,10 +2,10 @@
envlist = {py39,py310,py311,py312,py313}-{sqlite,postgresql}
[testenv]
usedevelop = true
changedir = {toxworkdir}
extras = test
commands =
coverage run --omit=*/tests/* -m xmlrunner discover -s tests {posargs}
coverage run --source=trytond.modules.account_credit_limit --omit=*/tests/* -m xmlrunner discover -s trytond.modules.account_credit_limit {posargs}
commands_post =
coverage report
coverage xml
+3 -3
View File
@@ -1,6 +1,6 @@
Copyright (c) 2008-2009 virtual things - Preisler & Spallek GbR.
Copyright (c) 2008-2021 Korbinian Preisler.
Copyright (c) 2009-2012 Mathias Behrle.
Copyright (c) 2008-2009 virtual things - Preisler & Spallek GbR
Copyright (c) 2008-2021 Korbinian Preisler
Copyright (c) 2009-2012 Mathias Behrle
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-6
View File
@@ -1,6 +0,0 @@
include CHANGELOG
include COPYRIGHT
include LICENSE
include README.rst
include icons/LICENSE
graft doc
+10 -12
View File
@@ -15,8 +15,8 @@ else:
def get_info():
import configparser
import json
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
@@ -24,17 +24,15 @@ def get_info():
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name', '--description'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'], info['description'] = (
result.stdout.decode('utf-8').strip().splitlines())
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
major_version, minor_version, _ = version.split('.', 2)
metadata_cmd = 'python -m build --quiet --metadata'
if os.environ.get('DOC_NO_ISOLATION'):
metadata_cmd += ' --no-isolation'
metadata = subprocess.check_output(
metadata_cmd, shell=True, encoding='utf-8', cwd=module_dir).strip()
metadata = json.loads(metadata)
info['name'] = metadata['name']
info['description'] = metadata['summary']
major_version, minor_version, _ = metadata['version'].split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
if minor_version % 2:
@@ -1,2 +1,3 @@
build
sphinx_book_theme
sphinx_copybutton
+59
View File
@@ -0,0 +1,59 @@
[build-system]
requires = ['hatchling >= 1', 'hatch-tryton']
build-backend = 'hatchling.build'
[project]
name = 'trytond_account_de_skr03'
dynamic = ['version', 'dependencies', 'optional-dependencies', 'authors', 'readme']
requires-python = '>=3.9'
maintainers = [
{name = "Tryton", email = "foundation@tryton.org"},
]
description = "German chart of accounts SKR03 for Tryton"
license = 'GPL-3.0-or-later'
license-files = ['LICENSE', 'icons/LICENSE', 'COPYRIGHT']
keywords = ["tryton", "accounting", "coa", "german"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Plugins",
"Framework :: Tryton",
"Topic :: Office/Business",
"Topic :: Office/Business :: Financial :: Accounting",
"Topic :: Software Development :: Libraries :: Python Modules",
]
[project.entry-points.'trytond.modules']
account_de_skr03 = 'trytond.modules.account_de_skr03'
[project.urls]
homepage = "https://www.tryton.org/"
documentation = "https://docs.tryton.org/modules-account-de-skr03/"
changelog = "https://docs.tryton.org/modules-account-de-skr03/releases.html"
forum = "https://www.tryton.org/forum"
issues = "https://bugs.tryton.org/tryton"
funding = "https://www.tryton.org/donate"
[tool.hatch.build]
include = [
'**/tryton.cfg',
'**/*.py',
'**/*.xml',
'view/**/*.xml',
'locale/**/*.po',
'**/*.fodt',
'icons/**/*.svg',
'tests/**/*.rst',
'tests/**/*.json',
]
exclude = ['doc']
[tool.hatch.build.targets.wheel.sources]
"" = "trytond/modules/account_de_skr03"
[tool.hatch.metadata.hooks.tryton]
dependencies = []
copyright = 'COPYRIGHT'
readme = 'README.rst'
[tool.hatch.metadata.hooks.tryton.tryton-optional-dependencies]
test = []
-113
View File
@@ -1,113 +0,0 @@
#!/usr/bin/env python3
# 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 re
from configparser import ConfigParser
from setuptools import find_packages, setup
def read(fname):
content = io.open(
os.path.join(os.path.dirname(__file__), fname),
'r', encoding='utf-8').read()
content = re.sub(
r'(?m)^\.\. toctree::\r?\n((^$|^\s.*$)\r?\n)*', '', content)
return content
def get_require_version(name):
require = '%s >= %s.%s, < %s.%s'
require %= (name, major_version, minor_version,
major_version, minor_version + 1)
return require
config = ConfigParser()
config.read_file(open(os.path.join(os.path.dirname(__file__), 'tryton.cfg')))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
if key in info:
info[key] = info[key].strip().splitlines()
version = info.get('version', '0.0.1')
major_version, minor_version, _ = version.split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
name = 'trytond_account_de_skr03'
if minor_version % 2:
download_url = ''
else:
download_url = 'http://downloads.tryton.org/%s.%s/' % (
major_version, minor_version)
requires = []
for dep in info.get('depends', []):
if not re.match(r'(ir|res)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
requires.append(get_require_version('trytond'))
tests_require = []
setup(name=name,
version=version,
description='Tryton module with German chart of accounts SKR03',
long_description=read('README.rst'),
author='Tryton',
author_email='foundation@tryton.org',
url='http://www.tryton.org/',
download_url=download_url,
project_urls={
"Bug Tracker": 'https://bugs.tryton.org/',
"Documentation": (
'https://docs.tryton.org/latest/modules-account-de-skr03'),
"Forum": 'https://www.tryton.org/forum',
"Source Code": 'https://code.tryton.org/tryton',
},
keywords='tryton account chart german SKR03',
package_dir={'trytond.modules.account_de_skr03': '.'},
packages=(
['trytond.modules.account_de_skr03']
+ ['trytond.modules.account_de_skr03.%s' % p for p in find_packages()]
),
package_data={
'trytond.modules.account_de_skr03': (info.get('xml', [])
+ ['tryton.cfg']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Framework :: Tryton',
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Intended Audience :: Legal Industry',
'Intended Audience :: Manufacturing',
'License :: OSI Approved :: '
'GNU General Public License v3 or later (GPLv3+)',
'Natural Language :: German',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Office/Business',
'Topic :: Office/Business :: Financial :: Accounting',
],
license='GPL-3',
python_requires='>=3.9',
install_requires=requires,
extras_require={
'test': tests_require,
},
zip_safe=False,
entry_points="""
[trytond.modules]
account_de_skr03 = trytond.modules.account_de_skr03
""",
)
+2 -2
View File
@@ -2,10 +2,10 @@
envlist = {py39,py310,py311,py312,py313}-{sqlite,postgresql}
[testenv]
usedevelop = true
changedir = {toxworkdir}
extras = test
commands =
coverage run --omit=*/tests/* -m xmlrunner discover -s tests {posargs}
coverage run --source=trytond.modules.account_de_skr03 --omit=*/tests/* -m xmlrunner discover -s trytond.modules.account_de_skr03 {posargs}
commands_post =
coverage report
coverage xml
+2 -2
View File
@@ -1,5 +1,5 @@
Copyright (C) 2014-2025 Cédric Krier.
Copyright (C) 2014-2025 B2CK SPRL.
Copyright (C) 2014-2025 Cédric Krier <cedric.krier@b2ck.com>
Copyright (C) 2014-2025 B2CK SRL
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-6
View File
@@ -1,6 +0,0 @@
include CHANGELOG
include COPYRIGHT
include LICENSE
include README.rst
include icons/LICENSE
graft doc
+10 -12
View File
@@ -15,8 +15,8 @@ else:
def get_info():
import configparser
import json
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
@@ -24,17 +24,15 @@ def get_info():
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name', '--description'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'], info['description'] = (
result.stdout.decode('utf-8').strip().splitlines())
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
major_version, minor_version, _ = version.split('.', 2)
metadata_cmd = 'python -m build --quiet --metadata'
if os.environ.get('DOC_NO_ISOLATION'):
metadata_cmd += ' --no-isolation'
metadata = subprocess.check_output(
metadata_cmd, shell=True, encoding='utf-8', cwd=module_dir).strip()
metadata = json.loads(metadata)
info['name'] = metadata['name']
info['description'] = metadata['summary']
major_version, minor_version, _ = metadata['version'].split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
if minor_version % 2:
@@ -1,2 +1,3 @@
build
sphinx_book_theme
sphinx_copybutton
+62
View File
@@ -0,0 +1,62 @@
[build-system]
requires = ['hatchling >= 1', 'hatch-tryton']
build-backend = 'hatchling.build'
[project]
name = 'trytond_account_deposit'
dynamic = ['version', 'dependencies', 'optional-dependencies', 'authors', 'readme']
requires-python = '>=3.9'
maintainers = [
{name = "Tryton", email = "foundation@tryton.org"},
]
description = "Accounting deposit for Tryton"
license = 'GPL-3.0-or-later'
license-files = ['LICENSE', 'icons/LICENSE', 'COPYRIGHT']
keywords = ["tryton", "accounting", "deposit"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Plugins",
"Framework :: Tryton",
"Topic :: Office/Business",
"Topic :: Office/Business :: Financial :: Accounting",
"Topic :: Software Development :: Libraries :: Python Modules",
]
[project.entry-points.'trytond.modules']
account_deposit = 'trytond.modules.account_deposit'
[project.urls]
homepage = "https://www.tryton.org/"
documentation = "https://docs.tryton.org/modules-account-deposit/"
changelog = "https://docs.tryton.org/modules-account-deposit/releases.html"
forum = "https://www.tryton.org/forum"
issues = "https://bugs.tryton.org/tryton"
funding = "https://www.tryton.org/donate"
[tool.hatch.build]
include = [
'**/tryton.cfg',
'**/*.py',
'**/*.xml',
'view/**/*.xml',
'locale/**/*.po',
'**/*.fodt',
'icons/**/*.svg',
'tests/**/*.rst',
'tests/**/*.json',
]
exclude = ['doc']
[tool.hatch.build.targets.wheel.sources]
"" = "trytond/modules/account_deposit"
[tool.hatch.metadata.hooks.tryton]
dependencies = [
'python-dateutil',
'python-sql >= 0.4',
]
copyright = 'COPYRIGHT'
readme = 'README.rst'
[tool.hatch.metadata.hooks.tryton.tryton-optional-dependencies]
test = ['proteus']
-136
View File
@@ -1,136 +0,0 @@
#!/usr/bin/env python3
# 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 re
from configparser import ConfigParser
from setuptools import find_packages, setup
def read(fname):
content = io.open(
os.path.join(os.path.dirname(__file__), fname),
'r', encoding='utf-8').read()
content = re.sub(
r'(?m)^\.\. toctree::\r?\n((^$|^\s.*$)\r?\n)*', '', content)
return content
def get_require_version(name):
require = '%s >= %s.%s, < %s.%s'
require %= (name, major_version, minor_version,
major_version, minor_version + 1)
return require
config = ConfigParser()
config.read_file(open(os.path.join(os.path.dirname(__file__), 'tryton.cfg')))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
if key in info:
info[key] = info[key].strip().splitlines()
version = info.get('version', '0.0.1')
major_version, minor_version, _ = version.split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
name = 'trytond_account_deposit'
if minor_version % 2:
download_url = ''
else:
download_url = 'http://downloads.tryton.org/%s.%s/' % (
major_version, minor_version)
requires = ['python-dateutil', 'python-sql >= 0.4']
for dep in info.get('depends', []):
if not re.match(r'(ir|res)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
requires.append(get_require_version('trytond'))
tests_require = [
get_require_version('proteus'),
get_require_version('trytond_account_payment_clearing'),
]
setup(name=name,
version=version,
description='Tryton module for accounting deposit',
long_description=read('README.rst'),
author='Tryton',
author_email='foundation@tryton.org',
url='http://www.tryton.org/',
download_url=download_url,
project_urls={
"Bug Tracker": 'https://bugs.tryton.org/',
"Documentation": (
'https://docs.tryton.org/latest/modules-account-deposit'),
"Forum": 'https://www.tryton.org/forum',
"Source Code": 'https://code.tryton.org/tryton',
},
keywords='tryton account deposit',
package_dir={'trytond.modules.account_deposit': '.'},
packages=(
['trytond.modules.account_deposit']
+ ['trytond.modules.account_deposit.%s' % p for p in find_packages()]
),
package_data={
'trytond.modules.account_deposit': (info.get('xml', [])
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.fodt',
'icons/*.svg', 'tests/*.rst']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Framework :: Tryton',
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Intended Audience :: Legal Industry',
'License :: OSI Approved :: '
'GNU General Public License v3 or later (GPLv3+)',
'Natural Language :: Bulgarian',
'Natural Language :: Catalan',
'Natural Language :: Chinese (Simplified)',
'Natural Language :: Czech',
'Natural Language :: Dutch',
'Natural Language :: English',
'Natural Language :: Finnish',
'Natural Language :: French',
'Natural Language :: German',
'Natural Language :: Hungarian',
'Natural Language :: Indonesian',
'Natural Language :: Italian',
'Natural Language :: Persian',
'Natural Language :: Polish',
'Natural Language :: Portuguese (Brazilian)',
'Natural Language :: Romanian',
'Natural Language :: Russian',
'Natural Language :: Slovenian',
'Natural Language :: Spanish',
'Natural Language :: Turkish',
'Natural Language :: Ukrainian',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Office/Business',
'Topic :: Office/Business :: Financial :: Accounting',
],
license='GPL-3',
python_requires='>=3.9',
install_requires=requires,
extras_require={
'test': tests_require,
},
zip_safe=False,
entry_points="""
[trytond.modules]
account_deposit = trytond.modules.account_deposit
""",
)
+2 -2
View File
@@ -2,10 +2,10 @@
envlist = {py39,py310,py311,py312,py313}-{sqlite,postgresql}
[testenv]
usedevelop = true
changedir = {toxworkdir}
extras = test
commands =
coverage run --omit=*/tests/* -m xmlrunner discover -s tests {posargs}
coverage run --source=trytond.modules.account_deposit --omit=*/tests/* -m xmlrunner discover -s trytond.modules.account_deposit {posargs}
commands_post =
coverage report
coverage xml
+2 -2
View File
@@ -1,5 +1,5 @@
Copyright (C) 2013-2025 Cédric Krier.
Copyright (C) 2013-2025 B2CK SPRL.
Copyright (C) 2013-2025 Cédric Krier <cedric.krier@b2ck.com>
Copyright (C) 2013-2025 B2CK SRL
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-6
View File
@@ -1,6 +0,0 @@
include CHANGELOG
include COPYRIGHT
include LICENSE
include README.rst
include icons/LICENSE
graft doc
+10 -12
View File
@@ -15,8 +15,8 @@ else:
def get_info():
import configparser
import json
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
@@ -24,17 +24,15 @@ def get_info():
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name', '--description'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'], info['description'] = (
result.stdout.decode('utf-8').strip().splitlines())
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
major_version, minor_version, _ = version.split('.', 2)
metadata_cmd = 'python -m build --quiet --metadata'
if os.environ.get('DOC_NO_ISOLATION'):
metadata_cmd += ' --no-isolation'
metadata = subprocess.check_output(
metadata_cmd, shell=True, encoding='utf-8', cwd=module_dir).strip()
metadata = json.loads(metadata)
info['name'] = metadata['name']
info['description'] = metadata['summary']
major_version, minor_version, _ = metadata['version'].split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
if minor_version % 2:
@@ -1,2 +1,3 @@
build
sphinx_book_theme
sphinx_copybutton
+61
View File
@@ -0,0 +1,61 @@
[build-system]
requires = ['hatchling >= 1', 'hatch-tryton']
build-backend = 'hatchling.build'
[project]
name = 'trytond_account_dunning'
dynamic = ['version', 'dependencies', 'optional-dependencies', 'authors', 'readme']
requires-python = '>=3.9'
maintainers = [
{name = "Tryton", email = "foundation@tryton.org"},
]
description = "Accounting dunning for Tryton"
license = 'GPL-3.0-or-later'
license-files = ['LICENSE', 'icons/LICENSE', 'COPYRIGHT']
keywords = ["tryton", "accounting", "dunning"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Plugins",
"Framework :: Tryton",
"Topic :: Office/Business",
"Topic :: Office/Business :: Financial :: Accounting",
"Topic :: Software Development :: Libraries :: Python Modules",
]
[project.entry-points.'trytond.modules']
account_dunning = 'trytond.modules.account_dunning'
[project.urls]
homepage = "https://www.tryton.org/"
documentation = "https://docs.tryton.org/modules-account-dunning/"
changelog = "https://docs.tryton.org/modules-account-dunning/releases.html"
forum = "https://www.tryton.org/forum"
issues = "https://bugs.tryton.org/tryton"
funding = "https://www.tryton.org/donate"
[tool.hatch.build]
include = [
'**/tryton.cfg',
'**/*.py',
'**/*.xml',
'view/**/*.xml',
'locale/**/*.po',
'**/*.fodt',
'icons/**/*.svg',
'tests/**/*.rst',
'tests/**/*.json',
]
exclude = ['doc']
[tool.hatch.build.targets.wheel.sources]
"" = "trytond/modules/account_dunning"
[tool.hatch.metadata.hooks.tryton]
dependencies = [
'python-sql >= 0.4',
]
copyright = 'COPYRIGHT'
readme = 'README.rst'
[tool.hatch.metadata.hooks.tryton.tryton-optional-dependencies]
test = ['proteus']
-132
View File
@@ -1,132 +0,0 @@
#!/usr/bin/env python3
# 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 re
from configparser import ConfigParser
from setuptools import find_packages, setup
def read(fname):
content = io.open(
os.path.join(os.path.dirname(__file__), fname),
'r', encoding='utf-8').read()
content = re.sub(
r'(?m)^\.\. toctree::\r?\n((^$|^\s.*$)\r?\n)*', '', content)
return content
def get_require_version(name):
require = '%s >= %s.%s, < %s.%s'
require %= (name, major_version, minor_version,
major_version, minor_version + 1)
return require
config = ConfigParser()
config.read_file(open(os.path.join(os.path.dirname(__file__), 'tryton.cfg')))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
if key in info:
info[key] = info[key].strip().splitlines()
version = info.get('version', '0.0.1')
major_version, minor_version, _ = version.split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
name = 'trytond_account_dunning'
if minor_version % 2:
download_url = ''
else:
download_url = 'http://downloads.tryton.org/%s.%s/' % (
major_version, minor_version)
requires = ['python-sql >= 0.4']
for dep in info.get('depends', []):
if not re.match(r'(ir|res)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
requires.append(get_require_version('trytond'))
tests_require = [get_require_version('proteus')]
setup(name=name,
version=version,
description='Tryton module for account dunning',
long_description=read('README.rst'),
author='Tryton',
author_email='foundation@tryton.org',
url='http://www.tryton.org/',
project_urls={
"Bug Tracker": 'https://bugs.tryton.org/',
"Documentation": (
'https://docs.tryton.org/latest/modules-account-dunning'),
"Forum": 'https://www.tryton.org/forum',
"Source Code": 'https://code.tryton.org/tryton',
},
download_url=download_url,
keywords='tryton account dunning',
package_dir={'trytond.modules.account_dunning': '.'},
packages=(
['trytond.modules.account_dunning']
+ ['trytond.modules.account_dunning.%s' % p for p in find_packages()]
),
package_data={
'trytond.modules.account_dunning': (info.get('xml', [])
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', 'tests/*.rst']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Framework :: Tryton',
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Intended Audience :: Legal Industry',
'License :: OSI Approved :: '
'GNU General Public License v3 or later (GPLv3+)',
'Natural Language :: Bulgarian',
'Natural Language :: Catalan',
'Natural Language :: Chinese (Simplified)',
'Natural Language :: Czech',
'Natural Language :: Dutch',
'Natural Language :: English',
'Natural Language :: Finnish',
'Natural Language :: French',
'Natural Language :: German',
'Natural Language :: Hungarian',
'Natural Language :: Indonesian',
'Natural Language :: Italian',
'Natural Language :: Persian',
'Natural Language :: Polish',
'Natural Language :: Portuguese (Brazilian)',
'Natural Language :: Romanian',
'Natural Language :: Russian',
'Natural Language :: Slovenian',
'Natural Language :: Spanish',
'Natural Language :: Turkish',
'Natural Language :: Ukrainian',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Office/Business',
'Topic :: Office/Business :: Financial :: Accounting',
],
license='GPL-3',
python_requires='>=3.9',
install_requires=requires,
extras_require={
'test': tests_require,
},
zip_safe=False,
entry_points="""
[trytond.modules]
account_dunning = trytond.modules.account_dunning
""",
)
+2 -2
View File
@@ -2,10 +2,10 @@
envlist = {py39,py310,py311,py312,py313}-{sqlite,postgresql}
[testenv]
usedevelop = true
changedir = {toxworkdir}
extras = test
commands =
coverage run --omit=*/tests/* -m xmlrunner discover -s tests {posargs}
coverage run --source=trytond.modules.account_dunning --omit=*/tests/* -m xmlrunner discover -s trytond.modules.account_dunning {posargs}
commands_post =
coverage report
coverage xml
+2 -2
View File
@@ -1,5 +1,5 @@
Copyright (C) 2017-2025 Cédric Krier
Copyright (C) 2017-2025 B2CK
Copyright (C) 2017-2025 Cédric Krier <cedric.krier@b2ck.com>
Copyright (C) 2017-2025 B2CK SRL
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1,6 +0,0 @@
include CHANGELOG
include COPYRIGHT
include LICENSE
include README.rst
include icons/LICENSE
graft doc
+10 -12
View File
@@ -15,8 +15,8 @@ else:
def get_info():
import configparser
import json
import subprocess
import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
@@ -24,17 +24,15 @@ def get_info():
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
info = dict(config.items('tryton'))
result = subprocess.run(
[sys.executable, 'setup.py', '--name', '--description'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
info['name'], info['description'] = (
result.stdout.decode('utf-8').strip().splitlines())
result = subprocess.run(
[sys.executable, 'setup.py', '--version'],
stdout=subprocess.PIPE, check=True, cwd=module_dir)
version = result.stdout.decode('utf-8').strip()
major_version, minor_version, _ = version.split('.', 2)
metadata_cmd = 'python -m build --quiet --metadata'
if os.environ.get('DOC_NO_ISOLATION'):
metadata_cmd += ' --no-isolation'
metadata = subprocess.check_output(
metadata_cmd, shell=True, encoding='utf-8', cwd=module_dir).strip()
metadata = json.loads(metadata)
info['name'] = metadata['name']
info['description'] = metadata['summary']
major_version, minor_version, _ = metadata['version'].split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
if minor_version % 2:
@@ -1,2 +1,3 @@
build
sphinx_book_theme
sphinx_copybutton
@@ -0,0 +1,62 @@
[build-system]
requires = ['hatchling >= 1', 'hatch-tryton']
build-backend = 'hatchling.build'
[project]
name = 'trytond_account_dunning_email'
dynamic = ['version', 'dependencies', 'optional-dependencies', 'authors', 'readme']
requires-python = '>=3.9'
maintainers = [
{name = "Tryton", email = "foundation@tryton.org"},
]
description = "Accounting dunning by e-mail for Tryton"
license = 'GPL-3.0-or-later'
license-files = ['LICENSE', 'icons/LICENSE', 'COPYRIGHT']
keywords = ["tryton", "accounting", "dunning", "email"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Plugins",
"Framework :: Tryton",
"Topic :: Office/Business",
"Topic :: Office/Business :: Financial :: Accounting",
"Topic :: Software Development :: Libraries :: Python Modules",
]
[project.entry-points.'trytond.modules']
account_dunning_email = 'trytond.modules.account_dunning_email'
[project.urls]
homepage = "https://www.tryton.org/"
documentation = "https://docs.tryton.org/modules-account-dunning-email/"
changelog = "https://docs.tryton.org/modules-account-dunning-email/releases.html"
forum = "https://www.tryton.org/forum"
issues = "https://bugs.tryton.org/tryton"
funding = "https://www.tryton.org/donate"
[tool.hatch.build]
include = [
'**/tryton.cfg',
'**/*.py',
'**/*.xml',
'view/**/*.xml',
'locale/**/*.po',
'**/*.fodt',
'**/*.html',
'icons/**/*.svg',
'tests/**/*.rst',
'tests/**/*.json',
]
exclude = ['doc']
[tool.hatch.build.targets.wheel.sources]
"" = "trytond/modules/account_dunning_email"
[tool.hatch.metadata.hooks.tryton]
dependencies = [
'python-sql',
]
copyright = 'COPYRIGHT'
readme = 'README.rst'
[tool.hatch.metadata.hooks.tryton.tryton-optional-dependencies]
test = ['proteus']
-131
View File
@@ -1,131 +0,0 @@
#!/usr/bin/env python3
# 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 re
from configparser import ConfigParser
from setuptools import find_packages, setup
def read(fname):
content = io.open(
os.path.join(os.path.dirname(__file__), fname),
'r', encoding='utf-8').read()
content = re.sub(
r'(?m)^\.\. toctree::\r?\n((^$|^\s.*$)\r?\n)*', '', content)
return content
def get_require_version(name):
require = '%s >= %s.%s, < %s.%s'
require %= (name, major_version, minor_version,
major_version, minor_version + 1)
return require
config = ConfigParser()
config.read_file(open(os.path.join(os.path.dirname(__file__), 'tryton.cfg')))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
if key in info:
info[key] = info[key].strip().splitlines()
version = info.get('version', '0.0.1')
major_version, minor_version, _ = version.split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
name = 'trytond_account_dunning_email'
if minor_version % 2:
download_url = ''
else:
download_url = 'http://downloads.tryton.org/%s.%s/' % (
major_version, minor_version)
requires = ['python-sql']
for dep in info.get('depends', []):
if not re.match(r'(ir|res)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
requires.append(get_require_version('trytond'))
tests_require = [get_require_version('proteus')]
setup(name=name,
version=version,
description='Tryton module for account dunning email',
long_description=read('README.rst'),
author='Tryton',
author_email='foundation@tryton.org',
url='http://www.tryton.org/',
download_url=download_url,
project_urls={
"Bug Tracker": 'https://bugs.tryton.org/',
"Documentation": (
'https://docs.tryton.org/latest/modules-account-dunning-email'),
"Forum": 'https://www.tryton.org/forum',
"Source Code": 'https://code.tryton.org/tryton',
},
keywords='tryton account dunning email',
package_dir={'trytond.modules.account_dunning_email': '.'},
packages=(
['trytond.modules.account_dunning_email']
+ ['trytond.modules.account_dunning_email.%s' % p
for p in find_packages()]
),
package_data={
'trytond.modules.account_dunning_email': (info.get('xml', [])
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.html',
'icons/*.svg', 'tests/*.rst']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Framework :: Tryton',
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Intended Audience :: Legal Industry',
'License :: OSI Approved :: '
'GNU General Public License v3 or later (GPLv3+)',
'Natural Language :: Bulgarian',
'Natural Language :: Catalan',
'Natural Language :: Czech',
'Natural Language :: Dutch',
'Natural Language :: English',
'Natural Language :: Finnish',
'Natural Language :: French',
'Natural Language :: German',
'Natural Language :: Hungarian',
'Natural Language :: Indonesian',
'Natural Language :: Italian',
'Natural Language :: Persian',
'Natural Language :: Portuguese (Brazilian)',
'Natural Language :: Romanian',
'Natural Language :: Russian',
'Natural Language :: Slovenian',
'Natural Language :: Spanish',
'Natural Language :: Turkish',
'Natural Language :: Ukrainian',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Office/Business',
],
license='GPL-3',
python_requires='>=3.9',
install_requires=requires,
extras_require={
'test': tests_require,
},
zip_safe=False,
entry_points="""
[trytond.modules]
account_dunning_email = trytond.modules.account_dunning_email
""",
)
+2 -2
View File
@@ -2,10 +2,10 @@
envlist = {py39,py310,py311,py312,py313}-{sqlite,postgresql}
[testenv]
usedevelop = true
changedir = {toxworkdir}
extras = test
commands =
coverage run --omit=*/tests/* -m xmlrunner discover -s tests {posargs}
coverage run --source=trytond.modules.account_dunning_email --omit=*/tests/* -m xmlrunner discover -s trytond.modules.account_dunning_email {posargs}
commands_post =
coverage report
coverage xml
+2 -2
View File
@@ -1,5 +1,5 @@
Copyright (C) 2016-2025 Cédric Krier
Copyright (C) 2016-2025 B2CK
Copyright (C) 2016-2025 Cédric Krier <cedric.krier@b2ck.com>
Copyright (C) 2016-2025 B2CK SRL
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-6
View File
@@ -1,6 +0,0 @@
include CHANGELOG
include COPYRIGHT
include LICENSE
include README.rst
include icons/LICENSE
graft doc

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