From dd617a365f7dc3f1e94e0d1312c989ccd67f696e Mon Sep 17 00:00:00 2001 From: Phillip Ferentinos Date: Fri, 30 Jun 2023 08:05:28 -0500 Subject: [PATCH] build: use pyproject.toml for dependency management over requirements.txt adds the ability to split out testing dependencies from the application runtime dependencies --- Dockerfile | 9 +++----- pyproject.toml | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 41 ----------------------------------- 3 files changed, 59 insertions(+), 47 deletions(-) create mode 100644 pyproject.toml delete mode 100755 requirements.txt diff --git a/Dockerfile b/Dockerfile index ddf2df0..c967829 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,12 +29,9 @@ RUN tar jxf phantomjs-2.1.1-linux-x86_64.tar.bz2 && \ rm phantomjs-2.1.1-linux-x86_64.tar.bz2 && \ mv phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs -RUN pip install --upgrade pip - -ADD ./requirements.txt /sirius/requirements.txt -RUN pip install --no-cache-dir -r requirements.txt - -RUN pip install honcho +RUN pip install --upgrade pip setuptools wheel +ADD ./pyproject.toml /sirius/pyproject.toml +RUN pip install --no-cache-dir . EXPOSE 5000 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..b13751a --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,56 @@ +[build-system] +requires = ["setuptools", "wheel"] + +[project] +name = "sirius" +readme = "README.md" +requires-python = ">=3.7,<3.8" +version = "0.0.0" +dependencies = [ + "Flask==1.1.1", + "Flask-Bootstrap==3.3.7.1", + "Flask-Cors==3.0.8", + "Flask-Dance==2.2.0", + "Flask-Login==0.4.1", + "Flask-Migrate==2.5.2", + "Flask-SQLAlchemy==2.4.0", + "Flask-Script==2.0.6", + "Flask-Sockets==0.2.1", + "Flask-WTF==0.14.2", + "Jinja2==2.10.1", + "Mako==1.1.0", + "MarkupSafe==1.1.1", + "Pillow==6.1.0", + "SQLAlchemy==1.3.8", + "WTForms==2.2.1", + "Werkzeug==0.15.6", + "alembic==1.1.0", + "argparse==1.2.1", + "backports.ssl-match-hostname==3.7.0.1", + "blinker==1.4", + "gevent==1.4.0", + "gevent-websocket==0.10.1", + "greenlet==0.4.15", + "gunicorn==19.9.0", + "httplib2==0.13.1", + "itsdangerous==1.1.0", + "nose==1.3.7", + "oauth2==1.9.0.post1", + "oauthlib==3.1.0", + "psycopg2-binary==2.8.3", + "pycrypto==2.6.1", + "redis==3.3.8", + "requests==2.22.0", + "requests-oauthlib==1.2.0", + "selenium==3.141.0", + "six==1.12.0", + "twitter==1.18.0", + "websocket-client==0.56.0", + "honcho", +] + +[project.optional-dependencies] +test = [ + "snapshottest @ git+git://github.com/syrusakbary/snapshottest.git@4ac2b4fb09e9e7728bebb11967c164a914775d1d#snapshottest", + "Flask-Testing==0.7.1", +] diff --git a/requirements.txt b/requirements.txt deleted file mode 100755 index 93e819e..0000000 --- a/requirements.txt +++ /dev/null @@ -1,41 +0,0 @@ -Flask==1.1.1 -Flask-Bootstrap==3.3.7.1 -Flask-Cors==3.0.8 -Flask-Dance==2.2.0 -Flask-Login==0.4.1 -Flask-Migrate==2.5.2 -Flask-SQLAlchemy==2.4.0 -Flask-Script==2.0.6 -Flask-Sockets==0.2.1 -Flask-Testing==0.7.1 -Flask-WTF==0.14.2 -Jinja2==2.10.1 -Mako==1.1.0 -MarkupSafe==1.1.1 -Pillow==6.1.0 -SQLAlchemy==1.3.8 -WTForms==2.2.1 -Werkzeug==0.15.6 -alembic==1.1.0 -argparse==1.2.1 -backports.ssl-match-hostname==3.7.0.1 -blinker==1.4 -gevent==1.4.0 -gevent-websocket==0.10.1 -greenlet==0.4.15 -gunicorn==19.9.0 -httplib2==0.13.1 -itsdangerous==1.1.0 -nose==1.3.7 -oauth2==1.9.0.post1 -oauthlib==3.1.0 -psycopg2-binary==2.8.3 -pycrypto==2.6.1 -redis==3.3.8 -requests==2.22.0 -requests-oauthlib==1.2.0 -selenium==3.141.0 -six==1.12.0 -git+git://github.com/syrusakbary/snapshottest.git@4ac2b4fb09e9e7728bebb11967c164a914775d1d#snapshottest -twitter==1.18.0 -websocket-client==0.56.0 -- 2.47.3