FlorianRhiem / pyGLFW

Python bindings for GLFW
MIT License
233 stars 36 forks source link

ENH: Add `sys.prefix`/lib to library search path #30

Closed hoechenberger closed 5 years ago

hoechenberger commented 5 years ago

When trying to create a conda-forge package of pyGLFW, I realized that it couldn't locate the glfw library, which conda installs into the lib subdirectory of sys.prefix. This commit adds this location to the search path. Additionally, it slightly changes the search path order: The priority is now

FlorianRhiem commented 5 years ago

Hello Richard, thank you for preparing the recipe for conda forge! I'm a bit confused by the change in the search order to move the package directory higher up, as it's only relevant on Windows while the other search paths are only relevant on unix-like OSs or for the conda package, which wouldn't include the library there, right? Could you explain the rationale behind the change? Maybe I'm just not thinking of the right corner case :)

hoechenberger commented 5 years ago

Hey Florian,

I'm a bit confused by the change in the search order to move the package directory higher up

oh, I should have explained: I did this solely for "logical" reasons. I thought it would make more sense to list the search paths in an order "closest to the user's script" --> "increasingly farther away from the user's script"; hence my idea to first look in the current directory, then pyGLFW's directory, followed by sys.prefix/lib, followed by "global" installations in /usr etc. Currently, this change has no actual practical motivation. I can revert this if you like!

hoechenberger commented 5 years ago

Thanks for merging!!

FlorianRhiem commented 5 years ago

Ah, that makes perfect sense. I just wanted to make sure I wasn't missing anything.

I've just released it as 1.8.2. Thank you for the improvement!

hoechenberger commented 5 years ago

I've just released it as 1.8.2.

There's currently no such tag on the git repository; however I could find the release on PyPI.

hoechenberger commented 5 years ago

There's currently no such tag on the git repository

Thanks, that's done now.

Oh, would you like to be a co-maintainer of the conda-forge recipe feedstock? I can add you if you like.

FlorianRhiem commented 5 years ago

Oh, would you like to be a co-maintainer of the conda-forge recipe feedstock? I can add you if you like.

My experience with conda is quite limited and packaging/deployment usually isn't the most fun work, so I'd prefer to leave that to you 😉

I'm using GitLab CI to build the packages for PyPI, is there anything that can or should be done automatically for conda when a new version is released?

hoechenberger commented 5 years ago

I'm using GitLab CI to build the packages for PyPI, is there anything that can or should be done automatically for conda when a new version is released?

No; in fact, conda-forge uses a bot that detects new PyPI releases and updates the package recipe automatically, so typically it's very little work to create a new release :)

FlorianRhiem commented 5 years ago

Ah, great!