mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Switch to setuptools-scm
This commit is contained in:
parent
a07c9bea44
commit
35c272dda2
4 changed files with 8 additions and 25 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -6,6 +6,7 @@ build
|
||||||
env
|
env
|
||||||
*.egg-info
|
*.egg-info
|
||||||
.cache
|
.cache
|
||||||
|
.eggs
|
||||||
.xprocess
|
.xprocess
|
||||||
dist
|
dist
|
||||||
tests/storage/dav/servers/*
|
tests/storage/dav/servers/*
|
||||||
|
|
|
||||||
14
docs/conf.py
14
docs/conf.py
|
|
@ -2,9 +2,6 @@
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
|
|
||||||
import pkg_resources
|
|
||||||
|
|
||||||
from sphinx.ext import autodoc
|
from sphinx.ext import autodoc
|
||||||
|
|
||||||
|
|
@ -19,15 +16,8 @@ project = u'vdirsyncer'
|
||||||
copyright = (u'2014-{}, Markus Unterwaditzer & contributors'
|
copyright = (u'2014-{}, Markus Unterwaditzer & contributors'
|
||||||
.format(datetime.date.today().strftime('%Y')))
|
.format(datetime.date.today().strftime('%Y')))
|
||||||
|
|
||||||
try:
|
import vdirsyncer
|
||||||
# The full version, including alpha/beta/rc tags.
|
release = vdirsyncer.__version__
|
||||||
release = pkg_resources.require('vdirsyncer')[0].version
|
|
||||||
except pkg_resources.DistributionNotFound:
|
|
||||||
print('To build the documentation, the distribution information of '
|
|
||||||
'vdirsyncer has to be available. Run "setup.py develop" to do '
|
|
||||||
'this.')
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
version = '.'.join(release.split('.')[:2]) # The short X.Y version.
|
version = '.'.join(release.split('.')[:2]) # The short X.Y version.
|
||||||
|
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
|
|
||||||
14
setup.py
14
setup.py
|
|
@ -3,23 +3,13 @@
|
||||||
Vdirsyncer is a synchronization tool for vdir. See the README for more details.
|
Vdirsyncer is a synchronization tool for vdir. See the README for more details.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import ast
|
|
||||||
import re
|
|
||||||
|
|
||||||
from setuptools import find_packages, setup
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
|
|
||||||
_version_re = re.compile(r'__version__\s+=\s+(.*)')
|
|
||||||
|
|
||||||
|
|
||||||
with open('vdirsyncer/__init__.py', 'rb') as f:
|
|
||||||
version = str(ast.literal_eval(_version_re.search(
|
|
||||||
f.read().decode('utf-8')).group(1)))
|
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='vdirsyncer',
|
name='vdirsyncer',
|
||||||
version=version,
|
use_scm_version=True,
|
||||||
|
setup_requires=['setuptools_scm'],
|
||||||
author='Markus Unterwaditzer',
|
author='Markus Unterwaditzer',
|
||||||
author_email='markus@unterwaditzer.net',
|
author_email='markus@unterwaditzer.net',
|
||||||
url='https://github.com/untitaker/vdirsyncer',
|
url='https://github.com/untitaker/vdirsyncer',
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@
|
||||||
'''
|
'''
|
||||||
vdirsyncer is a synchronization tool for vdir. See the README for more details.
|
vdirsyncer is a synchronization tool for vdir. See the README for more details.
|
||||||
'''
|
'''
|
||||||
__version__ = '0.5.1'
|
|
||||||
|
import pkg_resources
|
||||||
|
__version__ = pkg_resources.get_distribution('vdirsyncer').version
|
||||||
|
|
||||||
PROJECT_HOME = 'https://github.com/untitaker/vdirsyncer'
|
PROJECT_HOME = 'https://github.com/untitaker/vdirsyncer'
|
||||||
DOCS_HOME = 'https://vdirsyncer.readthedocs.org/en/latest'
|
DOCS_HOME = 'https://vdirsyncer.readthedocs.org/en/latest'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue