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

imagepy #5450

Merged
merged 7 commits into from
Mar 23, 2018
Merged

imagepy #5450

Changes from 2 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
46 changes: 46 additions & 0 deletions recipes/imagepy/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{% set name = "imagepy" %}
{% set version = "0.16" %}
{% set hash_type = "sha256" %}
{% set hash_value = "511556789365fffa4827f771ca246d10bbb7fd7a07240d6a29c39b3e44e83e1e" %}

package:
name: '{{ name|lower }}'
version: '{{ version }}'

source:
fn: '{{ name }}-{{ version }}.tar.gz'
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: {{ hash_value }}

build:
number: 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a pure Python package? If so, would take a look at using noarch: python. This would build one universal Python package that users could install on Python 2/3 on all platforms.

Copy link
Contributor Author

@yxdragon yxdragon Mar 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, pure python package, (with numba, pure?)
@jakirkham I think it is the matter of wxpython, here: https://wxpython.org/pages/downloads/

"Because of the differences between Linux distributions (mainly different versions of the core libraries installed by default, but also platform architecture and etc.) it is not possible to host binary wheel files for Linux on PyPI..."

wxpython.org say pypi not work on linux, I do not know if conda can solve it? and is there any wx app on conda? I want to have a look!

Copy link
Contributor

@djsutherland djsutherland Mar 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yxdragon conda-forge has a wxpython package: https://github.com/conda-forge/wxpython-feedstock. It should work fine.

If imagepy only has Python code in it, it can be noarch: python, even if it uses Numba / dependencies that aren't Python – it's just a question of whether imagepy itself installs any different files for different architectures, e.g. because it has to compile code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run time compilation via Numba still counts as pure Python. We are only concerned with compilation that occurs at build time and it sounds like imagepy doesn't do that. So imagepy counts as pure Python.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dougalsutherland
that is my CI build log, libgtk-x11-2.0, so I think wx does not work.

from wx.core import *
File "/home/conda/staged-recipes/build_artifacts/imagepy_1521691888499/_t_env/lib/python2.7/site-packages/wx/core.py", line 12, in
from ._core import *
ImportError: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. Sorry about that.

So we are not as cleanly separated from the OS as we would like. In some cases, particularly GUI packages, we rely on system backed things like Gtk and X11 to be provided for us. Ideally we would package things like X11 (we have done a lot of work in that direction) and Gtk, which we are working on in PR ( #3920 ). In cases where we rely on system packages, we notate this in a yum_requirements.txt file in the recipe like this one for wxpython.

Would just copy wxpython's yum_requirements.txt file and place it in your recipe here. This should install the needed Gtk and X11 libraries behind the scenes. In practice users will typically already have X11 and Gtk as they will be running on a Linux Desktop as opposed to a Docker image (which is where we are building this). In the future, we plan to do a better job of packaging these dependencies outright.

If you have any questions about this, please feel free to ask. :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went ahead and added yum_requirements.txt, which should fix this. Hope that is ok.

script: python setup.py install --single-version-externally-managed --record=record.txt
Copy link
Member

@jakirkham jakirkham Mar 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies. The example is a bit outdated. We should fix that. Currently we encourage using pip for the install.


requirements:
build:
- python
- setuptools
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also would change setuptools to pip.

run:
- python
- scikit-image >=0.12
- shapely >=1.0
- wxpython >=4.0
- numba >=0.29

test:
imports:
- imagepy

about:
home: https://github.com/Image-Py/imagepy
license: BSD 3-clause
license_family: BSD
license_file: ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added PR ( Image-Py/imagepy#16 ) upstream, which should ensure the license file can be included in packages in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jakirkham need I re upload to pypi first?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, so now that you've merged that PR the next upload to PyPI will have the license file in it. If you want to do a patch release now that includes that, then you could update the recipe to use that version and set license_file: LICENSE. Otherwise you could just remember to do it for the next release.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or could copy the license file over here for now, in which case it can be dropped from the recipe on the next update. Anyways lots of options to choose from here, feel free to pick what works best for you.

summary: interactive python image-processing plugin framework
description: Image process framework based on plugin like imagej, it is esay to glue with scipy.ndimage, scikit-image, opencv, simpleitk, mayavi...and any libraries based on numpy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would suggest wrapping the description. Here is a good example.

doc_url: 'https://github.com/Image-Py/imagepy'
dev_url: 'https://github.com/Image-Py/imagepy'

extra:
recipe-maintainers:
- yxdragon