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

Integrate zwo_fixer with the Python SWIG package #28

Open
bgottula opened this issue Aug 25, 2019 · 1 comment
Open

Integrate zwo_fixer with the Python SWIG package #28

bgottula opened this issue Aug 25, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@bgottula
Copy link
Collaborator

Not sure exactly how to do this. Pretty sure we can make the call to ZWOFixerInit() happen by inserting the relevant C code into asi.i, perhaps in the init section? Including the header file might be challenging given how poorly pip handles relative paths in setup.py.

For linking: it may be difficult for the SWIG C extension to find the zwo_fixer .so file unless it gets installed to a system directory. Alternatively, maybe it would be better to just statically link against it? I guess for static linking we would still need to use a relative path in setup.py for the linker to find the file, which is problematic.

Upon further reading, it appears that pip intentionally copies stuff to a temporary directory in part to prevent doing what we're trying to do. I guess the thinking is that if this package is distributed, setup.py is supposed to be in the root directory and all dependencies needed to build that package are supposed to be either in that same directory or sub-directories (see pypa/pip#5544). That's a little irritating, because zwo_fixer is not (only) meant to be a dependency of this SWIG Python package, so I don't want to move that under python/. Maybe we could move setup.py to the root directory of the repo instead?

@bgottula bgottula added the enhancement New feature or request label Aug 25, 2019
@bgottula
Copy link
Collaborator Author

@jgottula I'm willing to do some of the work on this but want to get your thoughts first.

@bgottula bgottula self-assigned this Aug 25, 2019
@bgottula bgottula assigned jgottula and unassigned bgottula Nov 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants