update to version 3

This commit is contained in:
j 2023-07-27 18:40:38 +02:00
parent 99e221095b
commit 2bac617dc9
2 changed files with 13 additions and 12 deletions

View file

@ -5,7 +5,7 @@ try:
from . import __version
__version__ = __version.VERSION
except:
__version__ = '2.3.x'
__version__ = '3.0.x'
from . import cache
from . import js

View file

@ -7,9 +7,10 @@ try:
except:
from distutils.core import setup
def get_revision():
def get_git_version():
import subprocess
return subprocess.check_output(['git', 'rev-list', 'HEAD', '--count']).decode().strip()
version = subprocess.check_output(['git', 'describe', '--tags']).decode().strip().replace('-', '.')
return '.'.join((version.split('.') + ['0'])[:3])
def get_version():
import os
@ -18,9 +19,8 @@ def get_version():
__version = os.path.join(os.path.dirname(__file__), 'ox/__version.py')
changelog = os.path.join(os.path.dirname(__file__), 'debian/changelog')
if os.path.exists(_git):
rev = get_revision()
if rev:
version = "2.3.%s" % rev
version = get_git_version()
if version:
with open(__version, 'w') as fd:
fd.write('VERSION="%s"' % version)
return version
@ -37,8 +37,8 @@ def get_version():
f.close()
rev = re.compile('\d+\.\d+\.(\d+)').findall(head)
if rev:
return '2.3.%s' % rev[0]
return '2.3.x'
return '3.0.%s' % rev[0]
return '3.0.x'
setup(
@ -56,11 +56,12 @@ setup(
classifiers=[
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)