Opened 9 years ago

Closed 9 years ago

#48107 closed update (fixed)

py-visa @1.4 update to 1.8

Reported by: joshuacookebarnes@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: kurthindenburg (Kurt Hindenburg), petrrr
Port: py-visa

Description

Attached is a patch for version update of the py-visa port to 1.5

This could just as easily update to 1.6 or 2.7, but there are significant API changes between 1.4 and 1.6, so I thought it'd be best to make 1.5 available, since it provides support for the 1.4 interface as well as the new features. If I'm trying to go about this the wrong way, let me know!

Several changes:

  • I've switched to pulling from the pyvisa maintainer's github repository instead of PyPI
  • livecheck updated to use github URL
  • added py33 version. py-visa and its dependencies all seem to cater for 33. py-visa also lists 32, but there's no py32-setuptools.
  • altered warning about 64-bit python. NI-VISA version 14.0 and above now support 64-bit apps, so there are two possible solutions.

Attachments (6)

Portfile.diff (3.2 KB) - added by joshuacookebarnes@… 9 years ago.
patch-setup.py.diff (484 bytes) - added by joshuacookebarnes@… 9 years ago.
corrects name of test suite
patch-pyvisa-visa_attributes.py.diff (397 bytes) - added by joshuacookebarnes@… 9 years ago.
fixes obviously broken import from types
patch-pyvisa-testsuite-test_visa.py.diff (403 bytes) - added by joshuacookebarnes@… 9 years ago.
fixes two broken imports
patch-pyvisa-legacy-visa.py.diff (414 bytes) - added by joshuacookebarnes@… 9 years ago.
This one I'm less sure about - quiets broken atexit function, but not sure if it's a legit solution
py-visa.diff (3.0 KB) - added by kurthindenburg (Kurt Hindenburg) 9 years ago.

Download all attachments as: .zip

Change History (18)

Changed 9 years ago by joshuacookebarnes@…

Attachment: Portfile.diff added

comment:1 Changed 9 years ago by mf2k (Frank Schima)

Keywords: haspatch added
Version: 2.3.3

Thanks!

comment:2 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

Cc: khindenburg@… added

Cc Me!

comment:3 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

Does test work for you?

sudo port -v test py27-visa

AttributeError: 'module' object has no attribute 'testsuite'

comment:4 in reply to:  3 Changed 9 years ago by joshuacookebarnes@…

Replying to khindenburg@…:

Does test work for you?

sudo port -v test py27-visa

AttributeError: 'module' object has no attribute 'testsuite'

Good point, no, it doesn't. I've little idea how testing works right now, but I'll take a look.

J

Changed 9 years ago by joshuacookebarnes@…

Attachment: patch-setup.py.diff added

corrects name of test suite

Changed 9 years ago by joshuacookebarnes@…

fixes obviously broken import from types

Changed 9 years ago by joshuacookebarnes@…

fixes two broken imports

Changed 9 years ago by joshuacookebarnes@…

This one I'm less sure about - quiets broken atexit function, but not sure if it's a legit solution

comment:5 Changed 9 years ago by joshuacookebarnes@…

Ok, I've managed to get tests to pass, with a few patches, mainly to fix broken import statements.

However, I also needed to patch a broken atexit function in pyvisa.legacy.visa, which was trying to use a resource_manager which turned out to be None at call. I'm not completely sure that this doesn't simply hide a broken test, rather than just get the test to run correctly.

Finally, the tests will only pass if the location of the visa shared library is set by a ~/.pyvisarc file. It might be worth patching to look for the library in the default Darwin install location (/Library/Frameworks/VISA.framework/VISA), but I haven't bothered so far.

Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

Attachment: py-visa.diff added

comment:6 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

I've attached a diff to 1.8 - I can't really test it. I think most of your patches are no longer needed. Let me know if you can test it and what changes you want.

comment:7 Changed 9 years ago by petrrr

Cc: petr@… added

Cc Me!

comment:8 Changed 9 years ago by petrrr

Summary: py-visa @1.4 update to 1.5py-visa @1.4 update to 1.8

There seem to be no port depending on py-visa, so I guess we no not need to care about backwards compatibility.

comment:9 Changed 9 years ago by petrrr

BTW: If we discontinue the py26 subport, shouldn't it be graveyarded?

comment:10 in reply to:  9 Changed 9 years ago by mf2k (Frank Schima)

Replying to petr@…:

BTW: If we discontinue the py26 subport, shouldn't it be graveyarded?

Yes.

comment:11 Changed 9 years ago by mf2k (Frank Schima)

@khindenburg: Please commit your patch. No point in keeping this port at such an old version. The OS X VISA driver from National Instruments appears to be 64-bit now.

comment:12 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

Resolution: fixed
Status: newclosed

done r148362

Note: See TracTickets for help on using tickets.