Skip to content

Commit 42b4743

Browse files
committed
Updates Makefile
1 parent b3f5342 commit 42b4743

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
# http://www.opensource.org/licenses/MIT-license
66
# Copyright (c) 2015 Sébastien Eustace
77

8+
PENDULUM_RELEASE := $$(sed -n -E "s/VERSION = '(.+)'/\1/p" pendulum/version.py)
9+
810
# lists all available targets
911
list:
1012
@sh -c "$(MAKE) -p no_targets__ | \
@@ -21,21 +23,40 @@ setup: setup-python
2123
test:
2224
@py.test --cov=pendulum --cov-config .coveragerc tests/ -sq
2325

26+
release: tar wheels_x64 cp_wheels_x64 wheels_i686 cp_wheels_i686 wheel
27+
28+
publish:
29+
@python -m twine upload dist/pendulum-$(PENDULUM_RELEASE)*
30+
31+
tar:
32+
python setup.py sdist --formats=gztar
33+
34+
wheel:
35+
@pip wheel --no-index --no-deps --wheel-dir dist dist/pendulum-$(PENDULUM_RELEASE).tar.gz
36+
2437
wheels_x64: clean_wheels build_wheels_x64
2538

2639
wheels_i686: clean_wheels build_wheels_i686
2740

2841
build_wheels_x64:
42+
rm -rf wheelhouse/
2943
docker pull quay.io/pypa/manylinux1_x86_64
3044
docker run --rm -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /io/build-wheels.sh
3145

3246
build_wheels_i686:
47+
rm -rf wheelhouse/
3348
docker pull quay.io/pypa/manylinux1_i686
3449
docker run --rm -v `pwd`:/io quay.io/pypa/manylinux1_i686 /io/build-wheels.sh
3550

3651
clean_wheels:
3752
rm -rf wheelhouse/
3853

54+
cp_wheels_x64:
55+
cp wheelhouse/*manylinux1_x86_64.whl dist/
56+
57+
cp_wheels_i686:
58+
cp wheelhouse/*manylinux1_i686.whl dist/
59+
3960
upload_wheels_x64:
4061
@for f in wheelhouse/*manylinux1_x86_64.whl ; do \
4162
echo "Upload $$f" ; \

0 commit comments

Comments
 (0)