sciapp / gr

GR framework: a graphics library for visualisation applications
Other
329 stars 54 forks source link

Version inconsistency between github and pypi #48

Closed lgbaldoni closed 5 years ago

lgbaldoni commented 6 years ago

The latest release here appears to be 0.27.0, but it's nowhere to be found on pypi. On the other hand, the latter offers a version 1.0.0 that lacks all the plugins.

Is this on purpose?

jheinen commented 6 years ago

Did you try pip install gr ? Which platform are you using?

lgbaldoni commented 6 years ago

I have now, it fails with

  GR runtime not found.                                                                                                       
  Please visit https://gr-framework.org and install at least the following version of the GR runtime:                         
  0.27.0

Does this mean they are two different things?

I'm on openSUSE and I'm actually trying to package gr.

jheinen commented 6 years ago

The idea is, to split the wrappers (GR.jl => GR, python-gr => gr) from the GR run-time. pip install gr was tested with RedHat, CentOS, Ubuntu, Debian, macOS and Windows. For those systems, pre-built binaries are available and will be downloaded and extracted in the corresponding locations. openSUSE could be handled in a similar manner - we will check this and probably provide an update.

Nevertheless, if there is no suitable run-time available for a particular OS, the pip command should start installing from source (as it did before).

jheinen commented 6 years ago

... but you are right: three different version numbers (GR run-time, GR Python wrapper, GR.jl package for Julia) are confusing - we have to think about a better solution.

FlorianRhiem commented 6 years ago

Hello Luigino, we perform the following steps to test the successful installation of the gr package on the openSUSE 42.3 image from Docker Hub:

# Install GR runtime dependencies and python / pip
zypper install -y libXt6 libXrender1 libXext6 Mesa-libGL1 python python-pip
# Upgrade pip
pip install --upgrade pip
# Install gr
pip install dist/gr-*.tar.gz
# Create a test image (gks.png)
GKS_WSTYPE=png python -c 'import gr; gr.polyline([0, 1], [0, 1]); gr.updatews()'

I have just repeated these steps using pip install gr instead of pip install dist/gr-*.tar.gz to use the version on PyPI and it successfully installed gr and created the test image gks.png containing a diagonal line as expected.

lgbaldoni commented 6 years ago

@FlorianRhiem Actually I was trying to create a rpm package taking the supplied .spec file as guide. The tarball on pypi used to contain the whole runtime, now it seems to supply only the python module.

Does this mean I have to build them separately?

FlorianRhiem commented 6 years ago

Yes, we moved the Python wrapper for GR to its own repository at https://github.com/sciapp/python-gr. During the installation the setup.py checks for the GR runtime and if it doesn't find it, it downloads the required version from https://gr-framework.org/downloads/. This has worked well before with the Julia packages and allows Python and Julia users to install GR without having to build the runtime themselves.

@cfelder might be able to help you with RPM packages, he is the author of the spec file. I think the basic idea is to have one gr package for the runtime and one python-gr for the Python wrapper.