Skip to content

Commit 53e329c

Browse files
Move elasticdl_preprocessing folder out of the elasticdl main package in the wheel deployment. (#2044)
* Excluse elasticdl_preprocessing from the elasticdl main package. * Revert the change in elasticdl/requirements.txt
1 parent c2c0ae5 commit 53e329c

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

elasticdl/docker/Dockerfile.ci

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ COPY model_zoo /model_zoo
3333
RUN python -m pip install --quiet -r /model_zoo/requirements.txt \
3434
--extra-index-url=${EXTRA_PYPI_INDEX}
3535

36+
# Install elasticdl_preprocessing package
37+
COPY build/elasticdl_preprocessing-develop-py3-none-any.whl /
38+
RUN python -m pip install --quiet /elasticdl_preprocessing-develop-py3-none-any.whl \
39+
--extra-index-url=${EXTRA_PYPI_INDEX} \
40+
&& rm /elasticdl_preprocessing-develop-py3-none-any.whl
41+
3642
# Install elasticdl package
3743
COPY build/elasticdl-develop-py3-none-any.whl /
3844
RUN python -m pip install --quiet /elasticdl-develop-py3-none-any.whl \

scripts/build_and_test.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,7 @@ mv coverage.xml ./build
4646
# Create elasticdl package
4747
mkdir -p ./elasticdl/go/bin
4848
cp /tmp/elasticdl_ps ./elasticdl/go/bin/
49+
rm -rf ./build/lib
4950
python setup.py --quiet bdist_wheel --dist-dir ./build
51+
rm -rf ./build/lib
52+
python setup_preprocessing.py --quiet bdist_wheel --dist-dir ./build

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
with open("elasticdl/requirements.txt") as f:
1717
required_deps = f.read().splitlines()
18+
required_deps.append("elasticdl_preprocessing")
1819

1920
extras = {}
2021
with open("elasticdl/requirements-dev.txt") as f:
@@ -33,7 +34,9 @@
3334
install_requires=required_deps,
3435
extras_require=extras,
3536
python_requires=">=3.5",
36-
packages=find_packages(exclude=["*test*"]),
37+
packages=find_packages(
38+
exclude=["*test*", "elasticdl_preprocessing*", "model_zoo*"]
39+
),
3740
package_data={
3841
"": [
3942
"proto/*.proto",

elasticdl_preprocessing/setup.py renamed to setup_preprocessing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
install_requires=required_deps,
3535
extras_require=extras,
3636
python_requires=">=3.5",
37-
packages=find_packages(include=["*elasticdl_preprocessing*"],),
37+
packages=find_packages(
38+
include=["elasticdl_preprocessing*"], exclude=["*test*"]
39+
),
3840
package_data={"": ["requirements.txt"]},
3941
)

0 commit comments

Comments
 (0)