Opened 8 years ago

Last modified 6 years ago

#681 assigned task

Move All Package Dependencies to a Single Place

Reported by: ajj Owned by: piotr
Priority: critical Milestone: Admin Tasks
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing

Description (last modified by butler)

check what the right dependencies are for each package (sasmodels, sasview) and make sure setup.py calls the required ones.

Can we make it have optional requirements? e.g. is matplotlib actually required for sasview to function (might not want lots of dependencies for deployment on cluster/aws etc)

Change History (7)

comment:1 Changed 8 years ago by ricardo

This may help…
Below is the pip freeze of my virtual environments:

SasView?

bumps==0.7.6
cycler==0.10.0
h5py==2.6.0
lxml==3.6.4
matplotlib==1.5.3
numpy==1.11.2
periodictable==1.4.1
Pillow==3.4.1
pyparsing==2.1.10
python-dateutil==2.5.3
pytz==2016.7
scipy==0.18.1
six==1.10.0
wxPython==3.0.2.0
wxPython-common==3.0.2.0

SasModels?

appdirs==1.4.0
cffi==1.8.3
cycler==0.10.0
decorator==4.0.10
matplotlib==1.5.3
numpy==1.11.2
py==1.4.31
pycparser==2.14
pyopencl==2016.1
pyparsing==2.1.10
pytest==3.0.3
python-dateutil==2.5.3
pytools==2016.2.2
pytz==2016.7
scipy==0.18.1
six==1.10.0

Matplotlib is for compare.sh only I guess…

comment:2 Changed 8 years ago by pkienzle

Is sasmodels mature enough to release as a separate pypi component? Then it becomes just another dependency as far as sasview is concerned, with the same coordination requirements as bumps. May want to move sasview_model.py from sasmodels to sasview first, but not required.

comment:3 Changed 8 years ago by butler

  • Description modified (diff)
  • Milestone changed from SasView 4.1.0 to Admin Tasks
  • Type changed from defect to task

comment:4 Changed 8 years ago by piotr

I started working on this and soon it became apparent that the scope is much wider, especially considering move to Anaconda.

We want a set of package definitions (name-version) which developers can modify and which will be used on the build server to create appropriate environment in which sasview and sasmodels are built.

This means combining conda channels, pip installation and local packages from Gohlke's archive.

comment:5 Changed 8 years ago by butler

  • Owner set to piotr
  • Status changed from new to assigned

comment:6 Changed 8 years ago by pkienzle

Basically, anything which depends on significant third party libraries might be a problem if pip tries to install it. Pypi has binary wheels for some of these, with more available for windows than for mac. Anaconda has most of them, as do other python environments for windows.

They are:

pillow: libjpeg, libz, libtiff, libfreetype, tcl, tk
numpy: blas/lapack, fft, umfpack, …
scipy: …
wx: libwx, …
lxml: libxml2, libxslt
h5py: hdf5
reportlab: freetype
pyopencl: libOpenCL

The remaining direct requirements have no C dependencies and can be installed via pip. Some of them may also be available as system packages in linux or anaconda:

pyparsing
html5lib
pylint
xhtml2pdf (depends on pillow and reportlab)
sphinx
unittest-xml-reporting

We are supporting bumps and periodictable; they can be pip installed or git cloned, depending on whether you want to work on them:

periodictable
bumps

As Piotr's list above show, there are some indirect dependencies as well:

appdirs
cycler
decorator
py
pycparser
pytest
python-dateutil
pytools
pytz
six

OpenCL is a bit special since it is not available in anaconda or as binary wheels. I think "pip install pyopencl" worked for the mac (it already has the required drivers, headers and libraries). For windows I had to install the drivers and then used prebuilt binaries.* On linux I built my own packages. Ubuntu has packages for the headers and libraries, but I don't know about Fedora. Vendor drivers can be a bit challenging on linux…

comment:7 Changed 6 years ago by butler

  • Priority changed from major to critical
  • Summary changed from Package dependencies to Move All Package Dependencies to a Single Place

Much of this has been superseded with Anaconda and yml files. However we now have 5 files each "hard coding" the dependencies.

  • apple yml
  • unix yml
  • windows yml
  • installers/Check_packages.py
  • build_tools/requirements.txt

They do have different roles but we should just have maybe the requirements file and import that information into each of the other places.

Note: See TracTickets for help on using tickets.