Skip to content

Commit

Permalink
setup.py strikes back #yolo (kubeflow#67)
Browse files Browse the repository at this point in the history
* Update requirements

* Bring setup.py back from tag 1.9.1

* Try and fix "/bin/bash: line 1: .venv/bin/activate: No such file or directory"

* Remove former setup.cfg
  • Loading branch information
Jerome-Kaleido authored Nov 25, 2021
1 parent d6939c9 commit d99dc49
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 56 deletions.
16 changes: 11 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,15 @@ jobs:
- run:
name: Create virtualenv
command: |
cd core
python3 -m venv .venv
- run:
name: Check and install
command: |
cd core
. .venv/bin/activate
pip install . --extra-index-url https://${FURY_AUTH_TOKEN}:@deps.kaleido.ai/pypi/ --progress-bar off
python setup.py check
python setup.py install
- save_cache:
paths:
- core/.venv
Expand Down Expand Up @@ -148,6 +151,7 @@ jobs:
- run:
name: Create virtualenv
command: |
cd core
python3 -m venv .venv
- run:
name: Install packages
Expand All @@ -161,11 +165,13 @@ jobs:
echo "Not publishing library"
exit 0
fi
cd core
. .venv/bin/activate
pip install build twine
python -m build --wheel
twine check dist/*
twine upload dist/* --repository-url https://deps.kaleido.ai/pypi/ -u ${FURY_PUSH_TOKEN} -p "" --disable-progress-bar
python setup.py check
python setup.py sdist upload -r fury --show-response
python setup.py bdist upload -r fury --show-response
python setup.py bdist_wheel upload -r fury --show-response
# Docker
docker:
Expand Down
10 changes: 5 additions & 5 deletions core/requirements-deploy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ certifi==2021.10.8
# via
# requests
# sentry-sdk
charset-normalizer==2.0.7
charset-normalizer==2.0.8
# via requests
click==8.0.3
# via wandb
Expand All @@ -24,7 +24,7 @@ google==3.0.0
# via kaleido-core
idna==3.3
# via requests
kaleido-core==2.5.0
kaleido-core==2.5.1
# via
# -r requirements-deploy.in
# removebg-core
Expand All @@ -47,7 +47,7 @@ numpy==1.21.4
# removebg-core
# scipy
# torchvision
opencv-python==4.5.4.58
opencv-python==4.5.4.60
# via
# -r requirements-deploy.in
# kaleido-core
Expand Down Expand Up @@ -83,13 +83,13 @@ pytz==2021.3
# via pandas
pyyaml==6.0
# via wandb
removebg-core==1.10.0
removebg-core==1.11.0
# via -r requirements-deploy.in
requests==2.26.0
# via
# kaleido-core
# wandb
scipy==1.7.2
scipy==1.7.3
# via kaleido-core
sentry-sdk==1.5.0
# via wandb
Expand Down
20 changes: 10 additions & 10 deletions core/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cffi==1.15.0
# via cryptography
cfgv==3.3.1
# via pre-commit
charset-normalizer==2.0.7
charset-normalizer==2.0.8
# via requests
click==8.0.3
# via
Expand All @@ -34,13 +34,13 @@ colorama==0.4.4
# via twine
configparser==5.1.0
# via wandb
cryptography==35.0.0
cryptography==36.0.0
# via secretstorage
distlib==0.3.3
# via virtualenv
docker-pycreds==0.4.0
# via wandb
docutils==0.18
docutils==0.18.1
# via readme-renderer
filelock==3.4.0
# via virtualenv
Expand All @@ -52,7 +52,7 @@ gitpython==3.1.24
# via wandb
google==3.0.0
# via kaleido-core
identify==2.3.6
identify==2.4.0
# via pre-commit
idna==3.3
# via requests
Expand All @@ -68,11 +68,11 @@ jeepney==0.7.1
# via
# keyring
# secretstorage
kaleido-core==2.5.0
kaleido-core==2.5.1
# via
# -r requirements-deploy.in
# removebg-core
keyring==23.2.1
keyring==23.3.0
# via twine
mccabe==0.6.1
# via flake8
Expand All @@ -99,7 +99,7 @@ numpy==1.21.4
# removebg-core
# scipy
# torchvision
opencv-python==4.5.4.58
opencv-python==4.5.4.60
# via
# -r requirements-deploy.in
# kaleido-core
Expand Down Expand Up @@ -130,7 +130,7 @@ pillow==8.4.0
# kaleido-core
# removebg-core
# torchvision
pkginfo==1.7.1
pkginfo==1.8.1
# via twine
platformdirs==2.4.0
# via virtualenv
Expand Down Expand Up @@ -172,7 +172,7 @@ readme-renderer==30.0
# via twine
regex==2021.11.10
# via black
removebg-core==1.10.0
removebg-core==1.11.0
# via -r requirements-deploy.in
requests==2.26.0
# via
Expand All @@ -184,7 +184,7 @@ requests-toolbelt==0.9.1
# via twine
rfc3986==1.5.0
# via twine
scipy==1.7.2
scipy==1.7.3
# via kaleido-core
secretstorage==3.3.1
# via keyring
Expand Down
12 changes: 6 additions & 6 deletions core/requirements-eval.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ certifi==2021.10.8
# via
# requests
# sentry-sdk
charset-normalizer==2.0.7
charset-normalizer==2.0.8
# via
# aiohttp
# requests
Expand Down Expand Up @@ -92,7 +92,7 @@ idna==3.3
# yarl
importlib-metadata==4.8.2
# via markdown
kaleido-core==2.5.0
kaleido-core==2.5.1
# via -r requirements.in
markdown==3.3.6
# via tensorboard
Expand Down Expand Up @@ -125,7 +125,7 @@ numpy==1.21.4
# torchvision
oauthlib==3.1.1
# via requests-oauthlib
opencv-python==4.5.4.58
opencv-python==4.5.4.60
# via
# -r requirements-eval.in
# -r requirements.in
Expand Down Expand Up @@ -179,7 +179,7 @@ python-dateutil==2.8.2
# via
# pandas
# wandb
pytorch-lightning==1.5.2
pytorch-lightning==1.5.3
# via -r requirements-eval.in
pytz==2021.3
# via pandas
Expand All @@ -199,9 +199,9 @@ requests==2.26.0
# wandb
requests-oauthlib==1.3.0
# via google-auth-oauthlib
rsa==4.7.2
rsa==4.8
# via google-auth
scipy==1.7.2
scipy==1.7.3
# via kaleido-core
sentry-sdk==1.5.0
# via wandb
Expand Down
12 changes: 6 additions & 6 deletions core/requirements-train.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ certifi==2021.10.8
# via
# requests
# sentry-sdk
charset-normalizer==2.0.7
charset-normalizer==2.0.8
# via
# aiohttp
# requests
Expand Down Expand Up @@ -94,7 +94,7 @@ idna==3.3
# yarl
importlib-metadata==4.8.2
# via markdown
kaleido-core==2.5.0
kaleido-core==2.5.1
# via -r requirements.in
markdown==3.3.6
# via tensorboard
Expand Down Expand Up @@ -124,7 +124,7 @@ numpy==1.21.4
# torchvision
oauthlib==3.1.1
# via requests-oauthlib
opencv-python==4.5.4.58
opencv-python==4.5.4.60
# via
# -r requirements.in
# kaleido-core
Expand Down Expand Up @@ -176,7 +176,7 @@ python-dateutil==2.8.2
# wandb
python-etcd==0.4.5
# via torchelastic
pytorch-lightning==1.5.2
pytorch-lightning==1.5.3
# via -r requirements-train.in
pytz==2021.3
# via pandas
Expand All @@ -195,9 +195,9 @@ requests==2.26.0
# wandb
requests-oauthlib==1.3.0
# via google-auth-oauthlib
rsa==4.7.2
rsa==4.8
# via google-auth
scipy==1.7.2
scipy==1.7.3
# via kaleido-core
sentry-sdk==1.5.0
# via wandb
Expand Down
36 changes: 12 additions & 24 deletions setup.cfg → core/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[metadata]
name = removebg-core

description_file =
description-file =
README.md
description = remove.bg Core Package

author = David Fankhauser
author_email = david@kaleido.ai

maintainer = David Fankhauser
maintainer_email = david@kaleido.ai
maintainer-email = david@kaleido.ai

home_page = https://github.com/remove-bg/kaleido-removebg
home-page = https://github.com/remove-bg/kaleido-removebg

classifier =
Development Status :: 5 - Production/Stable
Expand All @@ -36,37 +36,25 @@ keywords =
[options]
zip_safe = False
include_package_data = True
package_dir =
=core
packages = find:
install_requires =
setup_requires =
wheel
kaleido-core>=1.3.10
shadowgen-core<2.0.0
torch>=1.8.0
torchvision>=0.9.0
numpy>=1.17,<1.22.0
opencv-python>=4.1,<5.0.0
wandb<0.12
pika>=1.0.0,<2.0.0
msgpack<1.0.0
pandas<1.4.0
nibabel<2.5.0,>=2.4.0
pillow>=7.2.0,<9.0.0
setuptools
scripts =
core/bin/removebg-demo.py
core/bin/removebg-server.py
core/bin/removebg-train-trimap.py
bin/removebg-demo.py
bin/removebg-server.py
bin/removebg-train-trimap.py

[options.package_data]
* = *.md, *.txt

[options.packages.find]
where=core

[files]
packages =
removebg

[entry_points]
pbr.config.drivers =
plain = pbr.cfg.driver:Plain

[bdist_wheel]
universal = False
17 changes: 17 additions & 0 deletions core/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""Remove.bg Core Lib"""

from pkg_resources import parse_requirements
from setuptools import setup

with open("requirements.in") as requirements_in:
requirements = [line for line in requirements_in if not line.startswith("--")]

install_requires = [str(requirement) for requirement in parse_requirements(requirements)]

# See setup.cfg
setup(
setup_requires=["pbr>=2.5", "setuptools>=17.1"],
pbr=True,
install_requires=install_requires,
python_requires=">=3.6",
)

0 comments on commit d99dc49

Please sign in to comment.