Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#15771 closed submission (fixed)

Portfile for py25-tables

Reported by: tom.duck@… Owned by: skymoo (Adam Mercer)
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: py25-tables Cc:
Port:

Description

Python 2.5 is missing the pytables extension library (http://www.pytables.org/), which is used to read hdf5 file in python. I have attached a Portfile based on the one for Python 2.4 at http://trac.macports.org/browser/trunk/dports/python/py-tables/Portfile.

I wrote my email in as the maintainer, but I would be just as happy if someone else's name was put in.

I ran the units tests that came with the package, and a few failures showed up. A transcript is given in the second attachment. These appear to be known and minor bugs associated with changes in the latest version of py25-numpy that have yet to be addressed by the pytables team. See the series of posts at http://thread.gmane.org/gmane.comp.python.pytables.user/849 for more information.

Attachments (3)

test_all.log (8.5 KB) - added by tom.duck@… 16 years ago.
Unit test transcript
Portfile (1.7 KB) - added by tom.duck@… 16 years ago.
py25-tables Portfile
patch-setup.py (1.1 KB) - added by tom.duck@… 16 years ago.
patch file for setup.py

Download all attachments as: .zip

Change History (13)

Changed 16 years ago by tom.duck@…

Attachment: test_all.log added

Unit test transcript

comment:1 Changed 16 years ago by jmroot (Joshua Root)

Milestone: Port Submissions

comment:2 Changed 16 years ago by skymoo (Adam Mercer)

Owner: changed from macports-tickets@… to ram@…
Status: newassigned

comment:3 Changed 16 years ago by skymoo (Adam Mercer)

I get the following error when trying to install if py-tables is installed:

[ram@cizin py25-tables]$ sudo port install
--->  Fetching py25-tables
--->  Verifying checksum(s) for py25-tables
--->  Extracting py25-tables
--->  Configuring py25-tables
--->  Building py25-tables with target build_ext
--->  Staging py25-tables into destroot
--->  Installing py25-tables @2.0.3_0
--->  Activating py25-tables @2.0.3_0
Error: Target org.macports.activate returned: Image error: /opt/local/bin/nctoh5 is being used
by the active py-tables port.  Please deactivate this port first, or use the -f flag to force the
activation.
Error: Status 1 encountered during processing.

Would renaming nctoh5 to nctoh5-2.5 for python25 and nctoh5-2.4 for python24 cause anything to break?

comment:4 Changed 16 years ago by tom.duck@…

Oops. I missed that -- I wasn't aware that pytables had utilities packaged with it. I will look into it and get back to you.

Changed 16 years ago by tom.duck@…

Attachment: Portfile added

py25-tables Portfile

Changed 16 years ago by tom.duck@…

Attachment: patch-setup.py added

patch file for setup.py

comment:5 Changed 16 years ago by tom.duck@…

There are three utilities bundled with pytables: ptdump, ptrepack and nctoh5. See http://www.pytables.org/docs/manual/apd.html.

I have attached a patch for setup.py and a new Portfile that uses it. The patch appends "-py25" to each of the utility names. There are also some additional dependencies, and they are commented on in the Portfile. The python24 version should probably be updated in the same way (both for the script names and dependencies).

The approach fink uses is to create symlinks from the unversioned names to the higher-version scripts (e.g., ptdump -> ptdump-25). See http://www.finkports.info/ports/sci/pytables-py.html. That seems like a reasonable choice, although I have no idea how to implement that in the context of MacPorts. Having symlinks from the unversioned names is needed to avoid breaking user scripts that may be depend on them.

comment:6 Changed 16 years ago by skymoo (Adam Mercer)

Is the use of setuptools just for renaming the files? If so is there reason why they cannot be renamed in a post-destroot phase? i.e.

post-destroot {
  foreach f {ptdump ptrepack nctoh5} {
    move ${destroot}${prefix}/bin/${f} ${destroot}${prefix}/bin/${f}-py25
  }
}

Is there an inter-script dependency that renaming the programs in setup.py satisfies?

comment:7 Changed 16 years ago by tom.duck@…

Yes, you are quite right. I am not quite fluent in tcl, and so went for the easy fix in the python. ;)

comment:8 Changed 16 years ago by skymoo (Adam Mercer)

Resolution: fixed
Status: assignedclosed

committed in r37939 with minor changes, thanks

comment:9 Changed 15 years ago by jmroot (Joshua Root)

Type: enhancementsubmission

comment:10 Changed 15 years ago by (none)

Milestone: Port Submissions

Milestone Port Submissions deleted

Note: See TracTickets for help on using tickets.