Skip to content

Commit 3c0bdcb

Browse files
committed
Only use poetry for dependency management and packaging
1 parent a4fca34 commit 3c0bdcb

File tree

10 files changed

+27
-149
lines changed

10 files changed

+27
-149
lines changed

MANIFEST.in

Lines changed: 0 additions & 2 deletions
This file was deleted.

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ setup: setup-python
2323
test:
2424
@py.test --cov=pendulum --cov-config .coveragerc tests/ -sq
2525

26-
release: tar wheels_x64 cp_wheels_x64 wheels_i686 cp_wheels_i686 wheel
26+
release: wheels_x64 cp_wheels_x64 wheels_i686 cp_wheels_i686 wheel
2727

2828
publish:
2929
@python -m twine upload dist/pendulum-$(PENDULUM_RELEASE)*
@@ -32,19 +32,21 @@ tar:
3232
python setup.py sdist --formats=gztar
3333

3434
wheel:
35-
@pip wheel --no-index --no-deps --wheel-dir dist dist/pendulum-$(PENDULUM_RELEASE).tar.gz
35+
@poetry build -v
3636

3737
wheels_x64: clean_wheels build_wheels_x64
3838

3939
wheels_i686: clean_wheels build_wheels_i686
4040

4141
build_wheels_x64:
4242
rm -rf wheelhouse/
43+
mkdir wheelhouse
4344
docker pull quay.io/pypa/manylinux1_x86_64
4445
docker run --rm -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /io/build-wheels.sh
4546

4647
build_wheels_i686:
4748
rm -rf wheelhouse/
49+
mkdir wheelhouse
4850
docker pull quay.io/pypa/manylinux1_i686
4951
docker run --rm -v `pwd`:/io quay.io/pypa/manylinux1_i686 /io/build-wheels.sh
5052

build-wheels.sh

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,39 @@
11
#!/bin/bash
22
PYTHON_VERSIONS="cp27-cp27m cp35-cp35m cp36-cp36m"
33

4+
POETRY_PYTHON="cp36-cp36m"
5+
POETRY_VENV="/opt/python/poetry"
6+
echo "Create Poetry's virtualenv"
7+
/opt/python/${POETRY_PYTHON}/bin/pip install virtualenv
8+
/opt/python/${POETRY_PYTHON}/bin/virtualenv --python /opt/python/${POETRY_PYTHON}/bin/python ${POETRY_VENV}
9+
${POETRY_VENV}/bin/pip install poetry --pre
10+
11+
RELEASE=$(sed -n "s/VERSION = '\(.*\)'/\1/p" /io/pendulum/version.py)
12+
413
echo "Compile wheels"
514
for PYTHON in ${PYTHON_VERSIONS}; do
615
cd /io
7-
/opt/python/${PYTHON}/bin/pip install -r wheels-requirements.txt
8-
/opt/python/${PYTHON}/bin/pip install -r tests-requirements.txt
9-
/opt/python/${PYTHON}/bin/python setup.py sdist --dist-dir wheelhouse --formats=gztar
10-
/opt/python/${PYTHON}/bin/pip wheel --no-index --no-deps --wheel-dir wheelhouse wheelhouse/*.tar.gz
16+
/opt/python/${POETRY_PYTHON}/bin/virtualenv --python /opt/python/${PYTHON}/bin/python /opt/python/venv-${PYTHON}
17+
. /opt/python/venv-${PYTHON}/bin/activate
18+
${POETRY_VENV}/bin/poetry install -v
19+
${POETRY_VENV}/bin/poetry build -v
20+
mv dist/*-${RELEASE}-*.whl wheelhouse/
21+
deactivate
1122
cd -
1223
done
1324

1425
echo "Bundle external shared libraries into the wheels"
15-
for whl in /io/wheelhouse/*.whl; do
26+
for whl in /io/wheelhouse/pendulum-${RELEASE}-*.whl; do
1627
auditwheel repair $whl -w /io/wheelhouse/
28+
rm -f $whl
1729
done
1830

1931
echo "Install packages and test"
2032
for PYTHON in ${PYTHON_VERSIONS}; do
21-
/opt/python/${PYTHON}/bin/pip install pendulum --no-index -f /io/wheelhouse
33+
. /opt/python/venv-${PYTHON}/bin/activate
34+
pip install pendulum==${RELEASE} --no-index --find-links /io/wheelhouse
2235
find ./io/tests | grep -E "(__pycache__|\.pyc$)" | xargs rm -rf
23-
/opt/python/${PYTHON}/bin/py.test /io/tests
36+
pytest /io/tests
2437
find ./io/tests | grep -E "(__pycache__|\.pyc$)" | xargs rm -rf
38+
deactivate
2539
done

pendulum/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# -*- coding: utf-8 -*-
22

3-
VERSION = '1.4.3-beta'
3+
VERSION = '1.4.3b0'

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pendulum"
3-
version = "1.4.3-beta"
3+
version = "1.4.3b0"
44
description = "Python datetimes made easy."
55

66
license = "MIT"

requirements.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

setup.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 126 deletions
This file was deleted.

tests-requirements.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

wheels-requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)