Skip to content
Snippets Groups Projects
Commit e4f4e630 authored by squidfunk's avatar squidfunk Committed by Martin Donath
Browse files

Added requirements as explicit dependencies in setup.py

parent a00c8b1f
No related branches found
No related tags found
No related merge requests found
...@@ -24,21 +24,16 @@ MAINTAINER Martin Donath <martin.donath@squidfunk.com> ...@@ -24,21 +24,16 @@ MAINTAINER Martin Donath <martin.donath@squidfunk.com>
# Set build directory # Set build directory
WORKDIR /tmp WORKDIR /tmp
# Install dependencies
COPY requirements.txt .
RUN \
pip install -r requirements.txt && \
rm requirements.txt
# Copy files necessary for build # Copy files necessary for build
COPY material material COPY material .
COPY MANIFEST.in MANIFEST.in COPY MANIFEST.in .
COPY package.json package.json COPY package.json .
COPY setup.py setup.py COPY requirements.txt .
COPY setup.py .
# Perform build and cleanup artifacts # Perform build and cleanup artifacts
RUN \ RUN \
python setup.py install && \ python setup.py install 2>/dev/null && \
rm -rf /tmp/* rm -rf /tmp/*
# Set working directory # Set working directory
......
...@@ -19,5 +19,5 @@ ...@@ -19,5 +19,5 @@
# IN THE SOFTWARE. # IN THE SOFTWARE.
mkdocs>=0.16 mkdocs>=0.16
pygments pygments>=2.2
pymdown-extensions>=1.2 pymdown-extensions>=2.0
...@@ -25,6 +25,13 @@ from setuptools import setup, find_packages ...@@ -25,6 +25,13 @@ from setuptools import setup, find_packages
with open("package.json") as data: with open("package.json") as data:
package = json.load(data) package = json.load(data)
# Load list of dependencies
with open("requirements.txt") as data:
install_requires = [
line for line in data.read().split("\n")
if line and not line.startswith("#")
]
# Package description # Package description
setup( setup(
name = package["name"], name = package["name"],
...@@ -37,6 +44,7 @@ setup( ...@@ -37,6 +44,7 @@ setup(
keywords = package["keywords"], keywords = package["keywords"],
packages = find_packages(), packages = find_packages(),
include_package_data = True, include_package_data = True,
install_requires = install_requires,
entry_points = { entry_points = {
"mkdocs.themes": [ "mkdocs.themes": [
"material = material", "material = material",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment