File tree Expand file tree Collapse file tree 4 files changed +16
-9
lines changed Expand file tree Collapse file tree 4 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 1
1
[build-system ]
2
- requires = [" setuptools>=46.4" , " wheel" ]
2
+ requires = [" setuptools>=46.4" , " wheel" , " setuptools_scm[toml]>=4.1 " ]
3
3
build-backend = " setuptools.build_meta"
4
4
5
- [tool .semantic_release ]
6
- version_variable = [" src/sphinxcontrib/email/__init__.py:__version__" ]
7
- commit_subject = " Bump version to v{version}"
5
+ [tool .setuptools_scm ]
8
6
9
7
[tool .black ]
10
8
line-length = 88
Original file line number Diff line number Diff line change 1
1
[metadata]
2
2
name = sphinxcontrib-email
3
- version = attr: sphinxcontrib.email.__version__
4
3
project_urls =
5
4
GitHub: repo = https://github.com/sphinx-contrib/email
6
5
GitHub: issues = https://github.com/sphinx-contrib/email/issues
@@ -31,15 +30,17 @@ classifiers =
31
30
release = egg_info -RDb ' ' register bdist_egg sdist upload
32
31
33
32
[options]
34
- platforms = any
35
33
include_package_data = True
36
34
install_requires =
37
35
lxml>=4.5.2
38
36
Sphinx>=1.8
39
37
package_dir =
40
38
= src
41
39
packages = find_namespace:
40
+ platforms = any
42
41
python_requires = >=3.7
42
+ setup_requires =
43
+ setuptools_scm>=4.1
43
44
zip_safe = False
44
45
45
46
[options.packages.find]
Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
2
from setuptools import setup
3
3
4
- setup ()
4
+ setup (use_scm_version = True )
Original file line number Diff line number Diff line change 8
8
from .handlers import html_page_context_handler
9
9
from .roles import EmailRole
10
10
11
- logger = sphinx .util .logging .getLogger (__name__ )
11
+ try :
12
+ from importlib import metadata
13
+ except ImportError :
14
+ import importlib_metadata as metadata
15
+
16
+ try :
17
+ __version__ = "." .join (metadata .version ("sphinxcontrib-email" ).split ("." )[:3 ])
18
+ except metadata .PackageNotFoundError :
19
+ pass
12
20
13
- __version__ = "0.3.3"
21
+ logger = sphinx . util . logging . getLogger ( __name__ )
14
22
15
23
16
24
def setup (app : Sphinx ) -> dict [str , Any ]:
You can’t perform that action at this time.
0 commit comments