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

{vis}[foss/2016a] PyBERT 1.7.9 w/Python-3.5.1 (WIP) #3446

Closed
wants to merge 2 commits into from
Closed
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
easyblock = 'PythonPackage'

name = 'chaco'
version = '20160817'
commit_id = 'eeae890'
versionsuffix = '-Python-%(pyver)s'

homepage = 'http://code.enthought.com/projects/chaco/'
description = """Chaco is a Python plotting application toolkit that facilitates
writing plotting applications at all levels of complexity,
from simple scripts with hard-coded data to large plotting programs
with complex data interrelationships and a multitude of interactive tools.
While Chaco generates attractive static plots for publication and presentation,
it also works well for interactive data visualization and exploration."""

toolchain = {'name': 'foss', 'version': '2016a'}

source_urls = ['https://github.com/enthought/chaco/archive/']
sources = ['%s.tar.gz' % commit_id]
Copy link
Member

Choose a reason for hiding this comment

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

@hajgato 4.5.0 is the latest official release, why not use that?

Once we start diverging from official releases, we'll need to stick to it forever, since 20160817 will always be newer than 4.5.0 or any other newer version...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@boegel I had two options. Try to do everything with Python3, as the user want to use PyBERT simultaneously with pyGIMLi. As far as I got from pyGIMLi homepage, its requires Python3. So I had to use Python3 here as well. and the latest official release is not yet Python3 compatible. I could use version4.6.0beta.20160817 (or whatever is the version claimed by the code).

Other possibility to make a Python2/2.7.11-Python-3.5.1, and use all the stuff here with that.
(chaco/4.5.0-foss-2016a-Python-2.7.11-Python-3.5.1 or so). The option to use system Python is not a good way, since PyBERT requires Python 2.7

Copy link
Member

Choose a reason for hiding this comment

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

according to http://www.pygimli.org/installation.html#optional-prerequisites, pyGIMLi is compatible with Python 2.7 as well?

Copy link
Member

@boegel boegel Aug 26, 2016

Choose a reason for hiding this comment

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

also, I'm not sure what Python2/2.7.11-Python-3.5.1 is? is that Python 2 and 3 combined? that's a nice recipe for disaster ;)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok, for the future what is the recipe to use python2 and python3 together. Ok, in this project it is not needed, but if in the future this problem will pop up? If I have a linux distro, I can have both, and most of the cases its not a disaster.

Copy link
Member

Choose a reason for hiding this comment

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

I think the right approach would be to make a Python2/2.7.11-* module, and load Python (3) and Python2 together as deps

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

How do you prevent users to load python (2) and python2 module together? I think that's also a recipe for disaster (for example which order did they loaded it)

Copy link
Member

Choose a reason for hiding this comment

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

Nothing would break then, one module would just shadow the other?


dependencies = [
('Python', '3.5.1'),
('Pygments', '2.1.3', versionsuffix),
('enable', '20160817', versionsuffix),
]

sanity_check_paths = {
'files': [],
'dirs': ['lib/python%(pyshortver)s/site-packages'],
}

moduleclass = 'vis'
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
easyblock = 'PythonPackage'

name = 'enable'
version = '20160817'
commit_id = '168e222'
versionsuffix = '-Python-%(pyver)s'

homepage = 'http://code.enthought.com/projects/enable/'
description = """The Enable project provides two related multi-platform packages for drawing GUI objects.
The Enable package is a multi-platform object drawing library built on top of Kiva.
The core of Enable is a container/component model for drawing and event notification.
The core concepts of Enable are:
Component
Container
Events (mouse, drag, and key events)
Enable provides a high-level interface for creating GUI objects,
while enabling a high level of control over user interaction.
Enable is a supporting technology for the Chaco and BlockCanvas projects.
Kiva is a multi-platform DisplayPDF vector drawing engine that supports multiple output backends,
including Windows, GTK, and Macintosh native windowing systems,
a variety of raster image formats, PDF, and Postscript."""

toolchain = {'name': 'foss', 'version': '2016a'}

source_urls = ['https://github.com/enthought/enable/archive/']
sources = ['%s.tar.gz' % commit_id]
Copy link
Member

Choose a reason for hiding this comment

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

@hajgato why not use latest official release (4.5.1)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@boegel see comment for chaco


patches = [
'enable-%(version)s_numpy.patch',
'enable-%(version)s_kiva.patch',
]

builddependencies = [
('pkg-config', '0.29'),
('inputproto', '2.3.1'),
('kbproto', '1.0.7'),
('libpthread-stubs', '0.3'),
('renderproto', '0.11'),
('xcb-proto', '1.11', '', True),
('xextproto', '7.3.0'),
('xorg-macros', '1.19.0'),
('xproto', '7.0.28'),
('xtrans', '1.3.5'),
('SWIG', '3.0.10', versionsuffix),
]

dependencies = [
('Python', '3.5.1'),
('PyQt', '4.11.4', versionsuffix),
('Pillow', '3.2.0', versionsuffix),
('traits', '4.5.0', versionsuffix),
('traitsui', '5.1.0', versionsuffix),
('ReportLab', '3.3.0', versionsuffix),
('Pygments', '2.1.3', versionsuffix),
('pyface', '5.1.0', versionsuffix),
('kiwisolver', '20160309', versionsuffix),
Copy link
Member

Choose a reason for hiding this comment

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

@hajgato same here, a bundle would save us quite a bit of modules/easyconfigs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@boegel It makes sense, and I can use versions from github.

('libX11', '1.6.3'),
]

sanity_check_paths = {
'files': [],
'dirs': ['lib/python%(pyshortver)s/site-packages'],
}

moduleclass = 'vis'
29 changes: 29 additions & 0 deletions easybuild/easyconfigs/e/enable/enable-20160817_kiva.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#non-git version (without .git directory) build fails
Copy link
Member

Choose a reason for hiding this comment

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

how is this fixed here exactly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@boegel Somewhere in the code it is buried to read version info from .git directory.
I just made kiva use the version of enable (as far as I know, kiva is not distributed as standalone package, see next comment fo rthe next line). I took the inspiration from a 2 years old PR, which never been merged.
If you use git clone instead of downloading the actual commit, you do not need the patch.

Copy link
Member

Choose a reason for hiding this comment

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

@hajgato please include a reference to the PR?

#bundled kiva version is tied to enable
Copy link
Member

Choose a reason for hiding this comment

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

what does this mean, can you clarify? that we're including our own kiva?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@boegel Yes a kiva is icluded as well as agg for kiva. As far as I know, Enthought does not distribute a standalone kiva, at the homepage of this package referred to have two parts, enable and kiva (see http://code.enthought.com/projects/enable/)

Copy link
Member

Choose a reason for hiding this comment

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

ok, please extend the comment a bit to reflect this better? e.g. include the URL, etc?

#Aug 24th 2016 by B. Hajgato (Free University Brussels - VUB)
--- enable-168e222dababd4464062eb7a3ab92c4b591f7031/setup.py.org 2016-06-14 15:25:39.000000000 +0200
+++ enable-168e222dababd4464062eb7a3ab92c4b591f7031/setup.py 2016-08-24 13:50:19.959208391 +0200
@@ -93,18 +87,19 @@
version = full_version
"""
# Adding the git rev number needs to be done inside
- # write_version_py(), otherwise the import of kiva._version messes
+ # write_version_py(), otherwise the import of enable._version messes
# up the build under Python 3.
fullversion = VERSION
if os.path.exists('.git'):
git_revision, dev_num = git_version()
- elif os.path.exists('kiva/_version.py'):
+ # All packages are synced with the enable version
+ elif os.path.exists('enable/_version.py'):
# must be a source distribution, use existing version file
try:
- from kiva._version import git_revision, full_version
+ from enable._version import git_revision, full_version
except ImportError:
raise ImportError("Unable to import git_revision. Try removing "
- "kiva/_version.py and the build directory "
+ "enable/_version.py and the build directory "
"before building.")

match = re.match(r'.*?\.dev(?P<dev_num>\d+)', full_version)
16 changes: 16 additions & 0 deletions easybuild/easyconfigs/e/enable/enable-20160817_numpy.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#We do not have a deafault numpy-site.cfg, so numpy searches X11 libs only at standard locations.
#Here, we direclty add the location of the EB provided libX11.
# Aug 25th 2016 by B. Hajgato (Free University Brussels - VUB)
--- enable-168e222dababd4464062eb7a3ab92c4b591f7031/kiva/agg/setup.py.org 2016-08-17 17:12:22.000000000 +0200
+++ enable-168e222dababd4464062eb7a3ab92c4b591f7031/kiva/agg/setup.py 2016-08-25 11:31:29.272582528 +0200
@@ -235,7 +235,9 @@
# Frequently, the 64-bit libraries are not in a known location and need
# manual configuration. From experience, this is usually not detected by
# the builder if we do not raise an exception.
- x11_info = get_info('x11', notfound_action=2)
+ x11_info = {'libraries': ['X11'],
+ 'library_dirs': [os.path.join(os.environ["EBROOTLIBX11"], "lib")],
+ 'include_dirs': [os.path.join(os.environ["EBROOTLIBX11"], "include")]}
Copy link
Member

Choose a reason for hiding this comment

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

hmm, relying on $EBROOTLIBX11 is going to break if we use the components approach in #3440...

we may need to work around that by defining $EBROOT* variables for each of the components?

cc @wpoely86

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@boegel @wpoely86 I would break that. It's not anymore libX11, but a whole bunch of other stuff as well. If we define $EBROOT for all components that we defined individually, then we will have lots of $EBROOT variables.

Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member

Choose a reason for hiding this comment

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

hmm, ok, good point @hajgato, it would be a lot of $EBROOT's, indeed... and I guess it's fairly rare to have to grab the install prefix for one of the components

dict_append(plat_info, **x11_info)

elif plat=='gdkpixbuf2':
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
easyblock = 'PythonPackage'

name = 'kiwisolver'
version = '20160309'
Copy link
Member

Choose a reason for hiding this comment

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

@hajgato same here, why not use latest release (0.1.3)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@boegel 0.1.3 does not work with Python3, see commant @ chaco

commit_id = '24d610a'
versionsuffix = '-Python-%(pyver)s'

homepage = 'https://github.com/nucleic/kiwi'
description = """Kiwi is an efficient C++ implementation of the Cassowary constraint solving algorithm."""

toolchain = {'name': 'foss', 'version': '2016a'}

source_urls = ['https://github.com/nucleic/kiwi/archive/']
sources = ['%s.tar.gz' % commit_id]

use_pip = True

dependencies = [
('Python', '3.5.1'),
]

sanity_check_paths = {
'files': [],
'dirs': ['lib/python%(pyshortver)s/site-packages'],
}

moduleclass = 'numlib'
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
easyblock = 'PythonPackage'

name = 'Pillow'
version = '3.2.0'
versionsuffix = '-Python-%(pyver)s'
Copy link
Member

@boegel boegel Aug 25, 2016

Choose a reason for hiding this comment

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

@hajgato why not use the existing Pillow-3.2.0-intel-2016a-Python-2.7.11-freetype-2.6.3.eb?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@boegel for two reasons. This PR is based on foss toolcahin and not intel, and its needs Python3 and not Python2 ;)

Copy link
Member

Choose a reason for hiding this comment

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

ok, my bad, sorry


homepage = 'http://pillow.readthedocs.org/'
description = """Pillow is the 'friendly PIL fork' by Alex Clark and Contributors.
PIL is the Python Imaging Library by Fredrik Lundh and Contributors."""

toolchain = {'name': 'foss', 'version': '2016a'}

source_urls = [PYPI_SOURCE]
sources = [SOURCE_TAR_GZ]

dependencies = [
('Python', '3.5.1'),
('libjpeg-turbo', '1.4.2'),
('libpng', '1.6.21'),
('zlib', '1.2.8'),
('LibTIFF', '4.0.6'),
('freetype', '2.6.2'),
]

options = {'modulename': 'PIL'}

moduleclass = 'vis'
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
easyblock = 'PythonPackage'

name = 'PyBERT'
version = '1.7.9'
versionsuffix = '-Python-%(pyver)s'

homepage = 'https://github.com/capn-freako/PyBERT/wiki'
description = """PyBERT is a serial communication link bit error rate tester (BERT)
simulator with a graphical user interface (GUI), written in Python and
making use of the Enthought Traits/UI packages. It is intended to give
students, hobbyists, and curious engineers the ability to play with
serial communication link design concepts. It is not intended as a
mission critical tool for use by professional serial communication
link designers. There are much better tools available for that purpose."""

toolchain = {'name': 'foss', 'version': '2016a'}

source_urls = [PYPI_SOURCE]
sources = [SOURCE_TAR_GZ]

patches = [
'%(name)s-%(version)s_sphinx.patch',
'%(name)s-%(version)s_2to3.patch',
]

dependencies = [
('Python', '3.5.1'),
('matplotlib', '1.5.1', versionsuffix),
('Pygments', '2.1.3', versionsuffix),
('traits', '4.5.0', versionsuffix),
('traitsui', '5.1.0', versionsuffix),
('enable', '20160817', versionsuffix),
('chaco', '20160817', versionsuffix),
Copy link
Member

Choose a reason for hiding this comment

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

@hajgato would it make sense to make this a Bundle of Python packages (cfr. matplotlib), to avoid a bunch of modules/easyconfigs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@boegel It makes sense, and I can use versions from github.

Copy link
Member

Choose a reason for hiding this comment

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

@hajgato if you can stick to Python2, sticking to official releases should be fine?

]

use_pip = True
Copy link
Member

Choose a reason for hiding this comment

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

@hajgato any reason for preferring pip here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@boegel Its a Python package, and I think it should be installed using pip. Am I doing here something wrong?

Copy link
Member

Choose a reason for hiding this comment

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

the use_pip is there for specific use cases, like installing Python packages that are only distributed in .whl format

for standard Python packages, there's no need to use pip

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok then.


sanity_check_paths = {
'files': [],
'dirs': ['lib/python%(pyshortver)s/site-packages'],
}

moduleclass = 'vis'
Loading