Upgrade to 4.7

This commit is contained in:
Raimon Esteve 2017-12-22 10:59:09 +01:00
parent b0577c01fb
commit 09dc2cdb70
4 changed files with 88 additions and 23 deletions

51
.drone.yml Normal file
View File

@ -0,0 +1,51 @@
clone:
hg:
image: plugins/hg
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
services:
postgresql:
image: postgres
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:2.7
TOXENV: py27
DATABASE: sqlite
- IMAGE: python:2.7
TOXENV: py27
DATABASE: postgresql
- IMAGE: python:3.4
TOXENV: py34
DATABASE: sqlite
- IMAGE: python:3.4
TOXENV: py34
DATABASE: postgresql
- IMAGE: python:3.5
TOXENV: py35
DATABASE: sqlite
- IMAGE: python:3.5
TOXENV: py35
DATABASE: postgresql
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# The COPYRIGHT file at the top level of this repository contains the full
# copyright notices and license terms.
# This file is part party_credit_limit module for Tryton.
# The COPYRIGHT file at the top level of this repository contains
# the full copyright notices and license terms.
from setuptools import setup
import re
@ -12,6 +12,8 @@ try:
except ImportError:
from ConfigParser import ConfigParser
MODULE = 'party_credit_limit'
PREFIX = 'trytonspain'
MODULE2PREFIX = {}
@ -36,12 +38,10 @@ 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 = 'trytonspain_party_credit_limit'
requires = []
for dep in info.get('depends', []):
@ -50,29 +50,30 @@ for dep in info.get('depends', []):
requires.append(get_require_version('%s_%s' % (prefix, dep)))
requires.append(get_require_version('trytond'))
tests_require = []
tests_require = [get_require_version('proteus')]
dependency_links = []
if minor_version % 2:
# Add development index for testing with proteus
dependency_links.append('https://trydevpi.tryton.org/')
setup(name=name,
setup(name='%s_%s' % (PREFIX, MODULE),
version=version,
description='Tryton module which add credit_limit codes to parties',
description='Tryton party_credit_limit Module',
long_description=read('README'),
author='NaN·tic',
author_email='info@nan-tic.com',
url='http://www.nan-tic.com/',
download_url="https://bitbucket.org/trytonspain/trytond-party_credit_limit",
author='TrytonSpain',
author_email='info@trytonspain.com',
url='https://bitbucket.org/trytonspain/',
download_url="https://bitbucket.org/trytonspain/trytond-%s" % MODULE,
keywords='',
package_dir={'trytond.modules.party_credit_limit': '.'},
package_dir={'trytond.modules.%s' % MODULE: '.'},
packages=[
'trytond.modules.party_credit_limit',
'trytond.modules.party_credit_limit.tests',
'trytond.modules.%s' % MODULE,
'trytond.modules.%s.tests' % MODULE,
],
package_data={
'trytond.modules.party_credit_limit': (info.get('xml', [])
+ ['tryton.cfg', 'locale/*.po', 'view/*']),
'trytond.modules.%s' % MODULE: (info.get('xml', [])
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.odt',
'icons/*.svg', 'tests/*.rst']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
@ -82,14 +83,24 @@ setup(name=name,
'Intended Audience :: Financial and Insurance Industry',
'Intended Audience :: Legal Industry',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: Bulgarian',
'Natural Language :: Catalan',
'Natural Language :: Czech',
'Natural Language :: Dutch',
'Natural Language :: English',
'Natural Language :: French',
'Natural Language :: German',
'Natural Language :: Hungarian',
'Natural Language :: Italian',
'Natural Language :: Portuguese (Brazilian)',
'Natural Language :: Russian',
'Natural Language :: Slovenian',
'Natural Language :: Spanish',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Office/Business',
@ -100,10 +111,13 @@ setup(name=name,
zip_safe=False,
entry_points="""
[trytond.modules]
party_credit_limit = trytond.modules.party_credit_limit
""",
%s = trytond.modules.%s
""" % (MODULE, MODULE),
test_suite='tests',
test_loader='trytond.test_loader:Loader',
tests_require=tests_require,
use_2to3=True,
convert_2to3_doctests=[
'tests/scenario_party_credit_limit.rst',
],
)

View File

@ -1,10 +1,10 @@
[tox]
envlist = {py27,py33,py34,py35}-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
envlist = {py27,py34,py35,py36}-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
[testenv]
commands = {envpython} setup.py test
deps =
{py27,py33,py34,py35}-postgresql: psycopg2 >= 2.5
{py27,py34,py35,py36}-postgresql: psycopg2 >= 2.5
pypy-postgresql: psycopg2cffi >= 2.5
mysql: MySQL-python
sqlite: sqlitebck

View File

@ -1,5 +1,5 @@
[tryton]
version=4.3.0
version=4.7.0
depends:
sale_credit_limit
xml: