]> git.aero2k.de Git - sirius.git/commitdiff
build: use pyproject.toml for dependency management over requirements.txt
authorPhillip Ferentinos <phillipjf@users.noreply.github.com>
Fri, 30 Jun 2023 13:05:28 +0000 (08:05 -0500)
committerPhillip Ferentinos <phillipjf@users.noreply.github.com>
Wed, 5 Jul 2023 00:21:09 +0000 (19:21 -0500)
adds the ability to split out testing dependencies from the application runtime dependencies

Dockerfile
pyproject.toml [new file with mode: 0644]
requirements.txt [deleted file]

index ddf2df075f20f0369062b3a9a01657fb99ba9b86..c96782948c34a002ded5f40b74e4e8da070aa5c5 100644 (file)
@@ -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 (file)
index 0000000..b13751a
--- /dev/null
@@ -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 (executable)
index 93e819e..0000000
+++ /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