diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 142908d54a5e266597af36954820a427df99880c..d8ca857734e36236aafdac2d3ec22af8de0fc052 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,7 +25,7 @@ package: expire_in: 1 week test wheel installation: - image: python:3 + image: python:3.7 stage: test-build before_script: - apt-get remove -y git diff --git a/Dockerfile b/Dockerfile index ab0b5cd7bad2fb5b1618aef80f06210d31240364..7d5eda8d4d9ae94e6d7cf1216066cf9e3a75ef23 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3 +FROM python:3.7 ENV PYTHONUNBUFFERED 1 ENV BUILD_PACKAGES pandoc rsync openssh-client build-essential @@ -7,6 +7,6 @@ WORKDIR /code RUN apt-get update -y && apt-get install -y $BUILD_PACKAGES -RUN pip install --upgrade pip -ADD requirements.txt requirements-devel.txt /code/ -RUN pip install --upgrade -r requirements.txt -r requirements-devel.txt +RUN pip install pipenv +ADD Pipfile Pipfile.lock /code/ +RUN pipenv install --dev --system --deploy diff --git a/Pipfile b/Pipfile index 8fb956af27e57290fff0f8c1d9ee5b23684b9199..6b17e82004dc85cdf90d4d075e88c11c017d7de7 100644 --- a/Pipfile +++ b/Pipfile @@ -4,6 +4,16 @@ url = "https://pypi.org/simple" verify_ssl = true [dev-packages] +recommonmark = "*" +sphinx-markdown-tables = "*" +pytest = "*" +pytest-cov = ">=2.5.1" +sphinx-rtd-theme = "*" +twine = "*" +mypy = "*" +pylint = "*" +Sphinx = "*" +pipenv = "*" [packages] pyserial = "*" @@ -25,6 +35,3 @@ six = ">=1.12.0" python-dateutil = ">=2.7.5" eml-parser = ">=1.11" DateTime = "*" - -[requires] -python_version = "3.7" diff --git a/README.md b/README.md index 04ab5900444dac47362cd4b52b38a490f6f74032..8fa00de3369d2b6c9d89f6027e5df02478b44d64 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,10 @@ documentation. ## Development +### Pipenv +Use [Pipenv](https://pipenv.readthedocs.io/en/latest/) to manage the development packages. +If you are missing a small how-to, just ask and write it. :) + ### Tests Please write unittests if you add new features. All tests located in `src/test` are automatically tested when pushing to Gitlab. diff --git a/requirements-devel.txt b/requirements-devel.txt deleted file mode 100644 index 326d2b46090a34234680d8417df6186a51c6742c..0000000000000000000000000000000000000000 --- a/requirements-devel.txt +++ /dev/null @@ -1,11 +0,0 @@ -Sphinx -recommonmark -sphinx-markdown-tables -wheel -pytest -pytest-cov>=2.5.1 -sphinx_rtd_theme -setuptools -twine -mypy -pylint diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 492052c138c21d297f7c1475dfec951283528394..0000000000000000000000000000000000000000 --- a/requirements.txt +++ /dev/null @@ -1,19 +0,0 @@ -pyserial -numpy -scipy>=1.1.0 -pandas>=0.23.3 -matplotlib -tabulate -pytimeparse -pytz -pathlib -datetime -psutil -statsmodels -jsonpickle -multiprocess -dill -requests -six>=1.12.0 -python-dateutil>=2.7.5 -eml_parser>=1.11 diff --git a/setup.py b/setup.py index b217e4309399f4d8b3ef95765aaac524595727e3..d9d5685914d60ad3ef18a2601e9b9bb668254d39 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,7 @@ import os from setuptools import setup - +from pipenv.project import Project +from pipenv.utils import convert_deps_to_pip # Work around mbcs bug in distutils. # Sebastian 2019-03-04: not sure whether this is still needed... # http://bugs.python.org/issue10945 @@ -14,12 +15,9 @@ except LookupError: codecs.register(func) -thelibFolder = os.path.dirname(os.path.realpath(__file__)) -requirementPath = thelibFolder + '/requirements.txt' -install_requires = [] -if os.path.isfile(requirementPath): - with open(requirementPath) as f: - install_requires = f.read().splitlines() +pfile = Project(chdir=False).parsed_pipfile +install_requires = convert_deps_to_pip(pfile['packages'], r=False) +test_requirements = convert_deps_to_pip(pfile['dev-packages'], r=False) if __name__=='__main__':