-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (30 loc) · 1018 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Copyright (C) Yuki Takagi 2020
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# https://www.boost.org/LICENSE_1_0.txt)
PKGVER := $(shell cat setup.py | grep "version" | sed -e 's/^ *version="//;s/",//')
SRC := $(shell find strcuta -type f -name "*.py")
TARDIST := dist/strcuta-$(PKGVER).tar.gz
WHEEL := dist/strcuta-$(PKGVER)-py3-none-any.whl
DIST := $(TARDIST) $(WHEEL)
.PHONY: all clean bdist publish.test publish.pypi licensenote genimports
all: licensenote bdist
clean:
rm -rf dist
rm -rf build
rm -rf strcuta.egg-info
bdist: $(DIST)
$(SRC): genimports licensenote
$(DIST): $(SRC) setup.py
python setup.py sdist bdist_wheel
publish.test: $(DIST)
twine upload --repository testpypi dist/*
publish.pypi: $(DIST)
twine upload --repository pypi dist/*
publish.github: $(SRC)
git tag -a v$(PKGVER) -m "update to v$(PKGVER)"
git push --follow-tags
licensenote:
python script/notelicense.py
genimports:
python script/genimports.py