Skip to content

Commit ffe1528

Browse files
committed
Add make file and fix build filename.
Create paths in setup instead of hard-coding them.
1 parent 51a871b commit ffe1528

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# Except
55
!setup.py
66
!pyproject.toml
7+
!Makefile
78

89
!tests/
910
!tests/*

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
install:
2+
python3 -m pip install .
3+
4+
test:
5+
python3 setup.py test
6+
7+
build:
8+
python3 setup.py build
9+
10+
publish:
11+
python3 setup.py publish

setup.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,15 @@
3030
# Build and publish
3131
status = os.system("python3 -m build")
3232
if status == 0:
33-
status = os.system("twine upload dist/regex-toolkit-*.tar.gz dist/regex-toolkit-*.whl")
33+
status = os.system(
34+
" ".join(
35+
[
36+
"twine upload",
37+
os.path.join(here, "dist", "regex_toolkit-*.tar.gz"),
38+
os.path.join(here, "dist", "regex_toolkit-*.whl"),
39+
]
40+
)
41+
)
3442
sys.exit(status)
3543
elif sys.argv[-1] == "test":
3644
# Test

0 commit comments

Comments
 (0)