File tree 3 files changed +40
-15
lines changed
3 files changed +40
-15
lines changed Original file line number Diff line number Diff line change
1
+ name : Release workflow
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - " v[0123456789].*"
7
+
8
+ jobs :
9
+ release :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : checkout
13
+ uses : actions/checkout@v3
14
+ - name : setup python
15
+ uses : actions/setup-python@v2
16
+ with :
17
+ python-version : " 3.10"
18
+ - name : build
19
+ run : |
20
+ echo "__version__ = \"${GITHUB_REF_NAME:1}\"" > src/latexify/_version.py
21
+ python -m pip install --upgrade build
22
+ python -m build
23
+ - name : publish
24
+ uses : pypa/gh-action-pypi-publish@release/v1
25
+ with :
26
+ password : ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ build-backend = "hatchling.build"
6
6
7
7
[project ]
8
8
name = " latexify-py"
9
- version = " 0.1.1"
10
9
description = " Generates LaTeX math description from Python functions."
11
10
readme = " README.md"
12
11
requires-python = " >=3.7, <3.11"
@@ -36,6 +35,9 @@ classifiers = [
36
35
dependencies = [
37
36
" dill>=0.3.2" ,
38
37
]
38
+ dynamic = [
39
+ " version"
40
+ ]
39
41
40
42
[project .optional-dependencies ]
41
43
dev = [
@@ -64,6 +66,9 @@ only-packages = true
64
66
[tool .hatch .build .targets .wheel ]
65
67
packages = [" src/latexify" ]
66
68
69
+ [tool .hatch .version ]
70
+ path = " src/latexify/_version.py"
71
+
67
72
[tool .flake8 ]
68
73
max-line-length = 88
69
74
extend-ignore = " E203"
Original file line number Diff line number Diff line change 1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
- """Latexify toplevel module."""
1
+ """Latexify root package."""
2
+
3
+ try :
4
+ from latexify import _version
5
+
6
+ __version__ = _version .__version__
7
+ except :
8
+ __version__ = ""
15
9
16
10
from latexify import frontend
17
11
You can’t perform that action at this time.
0 commit comments