Skip to content

Commit 53cfbd4

Browse files
committed
Fix docs build command and use pep517 only
1 parent 976f678 commit 53cfbd4

File tree

6 files changed

+2209
-17
lines changed

6 files changed

+2209
-17
lines changed

.cicd/buildspec_docs.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ env:
44
shell: /bin/bash
55
variables:
66
USE_EPOCH: 0
7+
PY_VERSION: 3.8
78

89
phases:
910
install:
@@ -24,8 +25,17 @@ phases:
2425
if [ "${PRE}" == "tag" ]; then VERSION=`echo $CODEBUILD_WEBHOOK_TRIGGER|cut -d '/' -f 2`; TAG_RELEASE=1 ; fi
2526
fi
2627
- echo VERSION ends up being $VERSION
27-
- pip install -r requirements_dev.txt
28-
- pip install -r requirements.txt
28+
- (pip --version && pip install pip -U)|| curl -s https://bootstrap.pypa.io/get-pip.py | python
29+
- python -m pip install poetry
30+
- POETRY_BIN_FILE=`find /root/.pyenv -name poetry -type f 2>/dev/null`
31+
- echo $POETRY_BIN_FILE
32+
- POETRY_BIN_DIR=$(dirname "${POETRY_BIN_FILE}")
33+
- PATH=$POETRY_BIN_DIR:$PATH
34+
- poetry env use system
35+
- poetry install
36+
- POETRY_ENV=`poetry env info --path`
37+
- echo $POETRY_ENV
38+
- PATH=$POETRY_ENV/bin:$PATH
2939

3040
build:
3141
commands:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FROM $BASE_IMAGE as builder
66

77
WORKDIR /opt
88
COPY ecs_files_composer /opt/ecs_files_composer
9-
COPY setup.py pyproject.toml MANIFEST.in README.rst LICENSE /opt/
9+
COPY poetry.lock pyproject.toml MANIFEST.in README.rst LICENSE /opt/
1010
RUN python -m pip install pip -U; python -m pip install poetry; poetry build
1111

1212
FROM $BASE_IMAGE

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,23 +82,23 @@ servedocs: docs ## compile the docs watching for changes
8282

8383
release: dist ## package and upload a release
8484
twine check dist/*
85-
twine upload dist/*
85+
poetry publish --build
8686

8787
release-test: dist ## package and upload a release
8888
twine check dist/* || echo Failed to validate release
89-
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
89+
poetry config repositories.pypitest https://test.pypi.org/legacy/
90+
poetry publish -r pypitest --build
9091

9192
dist: clean ## builds source and wheel package
92-
python setup.py sdist
93-
python setup.py bdist_wheel
93+
poetry build
9494
ls -l dist
9595

9696
install: clean ## install the package to the active Python's site-packages
97-
python setup.py install
97+
pip install . --use-pep517 --use-feature=in-tree-build
9898

9999
conform : ## Conform to a standard of coding syntax
100100
isort --profile black ecs_files_composer
101-
black ecs_files_composer tests setup.py
101+
black ecs_files_composer tests
102102
find ecs_files_composer -name "*.json" -type f -exec sed -i '1s/^\xEF\xBB\xBF//' {} +
103103

104104
data-model:

0 commit comments

Comments
 (0)