mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Add version.py to packages
This commit is contained in:
parent
60a7778cea
commit
90aaa9d12a
3 changed files with 13 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -13,3 +13,4 @@ tests/storage/dav/servers/*
|
||||||
!tests/storage/dav/servers/__init__.py
|
!tests/storage/dav/servers/__init__.py
|
||||||
!tests/storage/dav/servers/radicale
|
!tests/storage/dav/servers/radicale
|
||||||
docs/_build/
|
docs/_build/
|
||||||
|
vdirsyncer/version.py
|
||||||
|
|
|
||||||
4
setup.py
4
setup.py
|
|
@ -8,7 +8,9 @@ from setuptools import find_packages, setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='vdirsyncer',
|
name='vdirsyncer',
|
||||||
use_scm_version=True,
|
use_scm_version={
|
||||||
|
'write_to': 'vdirsyncer/version.py',
|
||||||
|
},
|
||||||
setup_requires=['setuptools_scm'],
|
setup_requires=['setuptools_scm'],
|
||||||
author='Markus Unterwaditzer',
|
author='Markus Unterwaditzer',
|
||||||
author_email='markus@unterwaditzer.net',
|
author_email='markus@unterwaditzer.net',
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,15 @@ vdirsyncer is a synchronization tool for vdir. See the README for more details.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
__version__ = pkg_resources.get_distribution('vdirsyncer').version
|
|
||||||
|
try:
|
||||||
|
from .version import version as __version__
|
||||||
|
except ImportError:
|
||||||
|
raise ImportError(
|
||||||
|
'Failed to find (autogenerated) version.py. '
|
||||||
|
'This might be because you are installing from GitHub\'s tarballs, '
|
||||||
|
'use the PyPI ones.'
|
||||||
|
)
|
||||||
|
|
||||||
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