mirror of https://github.com/docker/compose.git
enable universal wheels
Signed-off-by: Thomas Grainger <tom.grainger@procensus.com>
This commit is contained in:
parent
09690e1758
commit
2648af6807
|
@ -7,7 +7,7 @@ RUN apk -U add \
|
||||||
COPY requirements.txt /code/requirements.txt
|
COPY requirements.txt /code/requirements.txt
|
||||||
RUN pip install -r /code/requirements.txt
|
RUN pip install -r /code/requirements.txt
|
||||||
|
|
||||||
ADD dist/docker-compose-release.tar.gz /code/docker-compose
|
ADD dist/docker-compose-release-py2.py3-none-any.whl /code/docker-compose
|
||||||
RUN pip install --no-deps /code/docker-compose/docker-compose-*
|
RUN pip install --no-deps /code/docker-compose/docker-compose-*
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/docker-compose"]
|
ENTRYPOINT ["/usr/bin/docker-compose"]
|
||||||
|
|
|
@ -11,6 +11,6 @@ TAG=$1
|
||||||
VERSION="$(python setup.py --version)"
|
VERSION="$(python setup.py --version)"
|
||||||
|
|
||||||
./script/build/write-git-sha
|
./script/build/write-git-sha
|
||||||
python setup.py sdist
|
python setup.py sdist bdist_wheel
|
||||||
cp dist/docker-compose-$VERSION.tar.gz dist/docker-compose-release.tar.gz
|
cp dist/docker-compose-$VERSION-py2.py3-none-any.whl dist/docker-compose-release-py2.py3-none-any.whl
|
||||||
docker build -t docker/compose:$TAG -f Dockerfile.run .
|
docker build -t docker/compose:$TAG -f Dockerfile.run .
|
||||||
|
|
|
@ -54,13 +54,13 @@ git push $GITHUB_REPO $VERSION
|
||||||
echo "Uploading the docker image"
|
echo "Uploading the docker image"
|
||||||
docker push docker/compose:$VERSION
|
docker push docker/compose:$VERSION
|
||||||
|
|
||||||
echo "Uploading sdist to PyPI"
|
echo "Uploading package to PyPI"
|
||||||
pandoc -f markdown -t rst README.md -o README.rst
|
pandoc -f markdown -t rst README.md -o README.rst
|
||||||
sed -i -e 's/logo.png?raw=true/https:\/\/github.com\/docker\/compose\/raw\/master\/logo.png?raw=true/' README.rst
|
sed -i -e 's/logo.png?raw=true/https:\/\/github.com\/docker\/compose\/raw\/master\/logo.png?raw=true/' README.rst
|
||||||
./script/build/write-git-sha
|
./script/build/write-git-sha
|
||||||
python setup.py sdist
|
python setup.py sdist bdist_wheel
|
||||||
if [ "$(command -v twine 2> /dev/null)" ]; then
|
if [ "$(command -v twine 2> /dev/null)" ]; then
|
||||||
twine upload ./dist/docker-compose-${VERSION/-/}.tar.gz
|
twine upload ./dist/docker-compose-${VERSION/-/}.tar.gz ./dist/docker-compose-${VERSION/-/}-py2.py3-none-any.whl
|
||||||
else
|
else
|
||||||
python setup.py upload
|
python setup.py upload
|
||||||
fi
|
fi
|
||||||
|
|
23
setup.py
23
setup.py
|
@ -4,10 +4,12 @@ from __future__ import absolute_import
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import codecs
|
import codecs
|
||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
import pkg_resources
|
||||||
from setuptools import find_packages
|
from setuptools import find_packages
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
|
@ -49,7 +51,25 @@ tests_require = [
|
||||||
|
|
||||||
if sys.version_info[:2] < (3, 4):
|
if sys.version_info[:2] < (3, 4):
|
||||||
tests_require.append('mock >= 1.0.1')
|
tests_require.append('mock >= 1.0.1')
|
||||||
install_requires.append('enum34 >= 1.0.4, < 2')
|
|
||||||
|
extras_require = {
|
||||||
|
':python_version < "3.4"': ['enum34 >= 1.0.4, < 2']
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
if 'bdist_wheel' not in sys.argv:
|
||||||
|
for key, value in extras_require.items():
|
||||||
|
if key.startswith(':') and pkg_resources.evaluate_marker(key[1:]):
|
||||||
|
install_requires.extend(value)
|
||||||
|
except Exception:
|
||||||
|
logging.getLogger(__name__).exception(
|
||||||
|
'Something went wrong calculating platform specific dependencies, so '
|
||||||
|
"you're getting them all!"
|
||||||
|
)
|
||||||
|
for key, value in extras_require.items():
|
||||||
|
if key.startswith(':'):
|
||||||
|
install_requires.extend(value)
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
|
@ -63,6 +83,7 @@ setup(
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
test_suite='nose.collector',
|
test_suite='nose.collector',
|
||||||
install_requires=install_requires,
|
install_requires=install_requires,
|
||||||
|
extras_require=extras_require,
|
||||||
tests_require=tests_require,
|
tests_require=tests_require,
|
||||||
entry_points="""
|
entry_points="""
|
||||||
[console_scripts]
|
[console_scripts]
|
||||||
|
|
Loading…
Reference in New Issue