File tree 6 files changed +11
-12
lines changed
6 files changed +11
-12
lines changed Original file line number Diff line number Diff line change 1
1
/deb_dist /
2
+ /vimdoc /_version.py
2
3
3
4
# Python.gitignore:
4
5
# Byte-compiled / optimized / DLL files
Original file line number Diff line number Diff line change 1
1
include README.md
2
- include vimdoc/VERSION.txt
3
2
4
3
graft tests
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
[build-system ]
2
- requires = [" setuptools>=61.2 " ]
2
+ requires = [" setuptools>=64 " , " setuptools-scm>=8 " ]
3
3
build-backend = " setuptools.build_meta"
4
4
5
5
[project ]
@@ -26,5 +26,5 @@ completion = ["shtab"]
26
26
packages = [" vimdoc" ]
27
27
script-files = [" scripts/vimdoc" ]
28
28
29
- [tool .setuptools . dynamic ]
30
- version = { file = " VERSION.txt " }
29
+ [tool .setuptools_scm ]
30
+ version_file = " vimdoc/_version.py "
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
"""Vimdoc: Vim helpfile generation."""
2
2
import sys
3
3
4
+ try :
5
+ from vimdoc ._version import __version__ as __version__
6
+ except ImportError :
7
+ import warnings
8
+ warnings .warn ('Failed to load __version__ from setuptools-scm' )
9
+ __version__ = '__unknown__'
10
+
4
11
5
12
# Don't even try to run under python 2 or earlier. It will seem to work but fail
6
13
# in corner cases with strange encoding errors.
7
14
if sys .version_info [0 ] < 3 :
8
15
raise ImportError ('Python < 3 is unsupported' )
9
16
10
17
11
- def __read_version_txt ():
12
- import pkgutil
13
- return pkgutil .get_data ('vimdoc' , 'VERSION.txt' ).decode ('utf-8' ).strip ()
14
-
15
- __version__ = __read_version_txt ()
16
-
17
18
SECTION = 'SECTION'
18
19
BACKMATTER = 'BACKMATTER'
19
20
EXCEPTION = 'EXCEPTION'
You can’t perform that action at this time.
0 commit comments