Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For discussion: Use pinned versions for all direct OMERO deps #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ USER tox
COPY --chown=tox:tox *.py /src/
COPY --chown=tox:tox README.rst /src
COPY --chown=tox:tox MANIFEST.in /src
COPY --chown=tox:tox *.txt /src/
COPY --chown=tox:tox omero /src/omero
COPY --chown=tox:tox omeroserver /src/omeroserver
WORKDIR /src
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
include LICENSE.txt
include requirements-*.txt
1 change: 1 addition & 0 deletions requirements-debian9.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tables==3.5.2
1 change: 1 addition & 0 deletions requirements-default.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tables==3.6.1
16 changes: 16 additions & 0 deletions requirements-pinned.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
omero-py==5.8.0

# https://github.com/ome/omero-py/blob/v5.8.0/setup.py#L217-L224
appdirs==1.4.4
future==0.18.2
numpy==1.19.1
Pillow==7.2.0
PyYAML==5.3.1
requests==2.24.0
# To speed this up install a distribution-specific wheel before installing
# this package (wheels cannot be included in requirements)
zeroc-ice==3.6.5

# minimum requirements for 'omero admin start'
omero-certificates==0.2.0
# tables==3.6.1 # Debian9/Ubuntu1604 won't work with 3.6.1
1 change: 1 addition & 0 deletions requirements-ubuntu1604.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tables==3.5.2
35 changes: 23 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Use is subject to license terms supplied in LICENSE.txt

"""

from glob import glob
import os
import sys

Expand All @@ -25,6 +25,26 @@ def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()


def parse_requirements(fname):
"""
Utility function to parse requirements.txt files.
"""
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
txt = f.read().splitlines()
return [
line.strip() for line in txt if not line.strip().startswith('#')]


def get_extras_require():
extras = {}
requirements_files = [os.path.basename(g) for g in glob(
os.path.join(os.path.dirname(__file__), 'requirements-*.txt'))]
for fname in requirements_files:
if fname != 'requirements-pinned.txt':
extras[fname[13:-4]] = parse_requirements(fname)
return extras


setup(name="omero-server",
version=osv,
description="CLI plugin for managing an OMERO.server",
Expand All @@ -48,17 +68,8 @@ def read(fname):
license='GPLv2+',
packages=find_packages(exclude=("test",))+["omero.plugins"],
python_requires='>=3',
install_requires=[
# requires Ice (use wheel for faster installs)
'omero-py',
# minimum requirements for `omero admin start`
'omero-certificates',
],
install_requires=parse_requirements('requirements-pinned.txt'),
include_package_data=True,
tests_require=['pytest'],
extras_require={
"debian9": ["tables<3.6"],
"ubuntu1604": ["tables<3.6"],
"default": ["tables"],
}
extras_require=get_extras_require(),
)