Opened 8 years ago

Closed 12 months ago

#51702 closed submission (fixed)

libusb-1.0 python wrapper

Reported by: anett_as@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: py-libusb1

Description

"port lint --nitpick py27-libusb1" gave me the error, that 'openmaintainer' is not allowed... However, I don't think that I can maintain this port. I just want to share the Portfiles I've written and that worked for me.

Attachments (5)

Portfile (1010 bytes) - added by anett_as@… 8 years ago.
Portfile.2 (943 bytes) - added by anett_as@… 8 years ago.
Portfile.3 (953 bytes) - added by anett_as@… 8 years ago.
Portfile.4 (1.0 KB) - added by anett_as@… 8 years ago.
Portfile.5 (1.0 KB) - added by anett_as@… 8 years ago.

Download all attachments as: .zip

Change History (15)

Changed 8 years ago by anett_as@…

Attachment: Portfile added

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

Port: py-libusb1 added; py27-libusb1 removed
Version: 2.3.4

Notes:

  • openmaintainer still requires a maintainer, hence the error. You want nomaintainer.
  • Use the Github portgroup to simplify the portfile.
  • The stub port should not have any dependencies. Add an if {${name} ne ${subport}} block for them.
  • The python portgroup already sets the category. So instead of overriding categories, use categories-append devel
  • Delete the revision line because 0 is the default.

comment:2 in reply to:  1 Changed 8 years ago by anett_as@…

Thanks for the comments.

I tried to address all of them to improve the portfile.

Replying to mf2k@…:

Notes:

  • openmaintainer still requires a maintainer, hence the error. You want nomaintainer.
  • Use the Github portgroup to simplify the portfile.
  • The stub port should not have any dependencies. Add an if {${name} ne ${subport}} block for them.
  • The python portgroup already sets the category. So instead of overriding categories, use categories-append devel
  • Delete the revision line because 0 is the default.

Changed 8 years ago by anett_as@…

Attachment: Portfile.2 added

comment:3 Changed 8 years ago by mf2k (Frank Schima)

Thanks. I just noticed that the only dependency, libusb, has a devel port (libusb-devel). It would be preferable to allow either of them to satisfy the dependency by using a file dependency instead of a port dependency.

comment:4 in reply to:  3 Changed 8 years ago by anett_as@…

I converted the port dependency to a file (lib) dependency.

Changed 8 years ago by anett_as@…

Attachment: Portfile.3 added

comment:5 Changed 8 years ago by mf2k (Frank Schima)

It looks like this port supports python 3.4 and 3.5. Please add those if it does. Then it looks ready to commit!

comment:6 in reply to:  5 Changed 8 years ago by anett_as@…

You are right. When trying to install the port for python 3.5, I realized that there is another dependency (py-setuptools). I added this.

Maybe one can omit the python.default_version line now?

Last edited 8 years ago by anett_as@… (previous) (diff)

Changed 8 years ago by anett_as@…

Attachment: Portfile.4 added

comment:7 Changed 8 years ago by mf2k (Frank Schima)

I get a checksum error when I try to build it:

$ sudo port install py35-libusb1
--->  Computing dependencies for py35-libusb1
--->  Fetching archive for py35-libusb1
--->  Attempting to fetch py35-libusb1-1.5.0_0.darwin_15.x86_64.tbz2 from https://packages.macports.org/py35-libusb1
--->  Attempting to fetch py35-libusb1-1.5.0_0.darwin_15.x86_64.tbz2 from http://sea.us.packages.macports.org/macports/packages/py35-libusb1
--->  Attempting to fetch py35-libusb1-1.5.0_0.darwin_15.x86_64.tbz2 from http://lil.fr.packages.macports.org/py35-libusb1
--->  Fetching distfiles for py35-libusb1
--->  Attempting to fetch python-libusb1-1.5.0.tar.gz from https://distfiles.macports.org/py-libusb1
--->  Attempting to fetch python-libusb1-1.5.0.tar.gz from http://sea.us.distfiles.macports.org/macports/distfiles/py-libusb1
--->  Attempting to fetch python-libusb1-1.5.0.tar.gz from https://github.com/vpelletier/python-libusb1/tarball/1.5.0
--->  Verifying checksums for py35-libusb1
Error: Checksum (rmd160) mismatch for python-libusb1-1.5.0.tar.gz
Error: Checksum (sha256) mismatch for python-libusb1-1.5.0.tar.gz
Error: Failed to checksum py35-libusb1: Unable to verify file checksums
Error: See /opt/local/var/macports/logs/_opt_mports_trunk_dports_python_py-libusb1/py35-libusb1/main.log for details.
Error: Follow http://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port py35-libusb1 failed

comment:8 in reply to:  7 Changed 8 years ago by anett_as@…

I never got this error. However, when I delete .../macports/distfiles/py-libusb1 folder, I can reproduce the problem. Maybe it is due to the change to the github portgroup. Nevertheless I corrected the checksums... Hopefully it works now.

Replying to mf2k@…:

I get a checksum error when I try to build it:

Changed 8 years ago by anett_as@…

Attachment: Portfile.5 added

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

OK it builds for me now. But I was poking around after it built and I have some more comments:

  • Can the examples directory be installed?
  • The readme mentions dependencies on cpython and pypy. Do those need to be added?

comment:10 Changed 12 months ago by TheRealKeto (Keto)

Resolution: fixed
Status: newclosed

In 8ad39bfe4311d6b7b56c3f4ee3dfdff575cd8cf5/macports-ports (master):

py-libusb1: new port (3.1.0)

Closes: #51702

Note: See TracTickets for help on using tickets.