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

Documentation error #74

Open
juancarlospaco opened this issue Jul 16, 2022 · 4 comments
Open

Documentation error #74

juancarlospaco opened this issue Jul 16, 2022 · 4 comments

Comments

@juancarlospaco
Copy link
Contributor

juancarlospaco commented Jul 16, 2022

This is about https://github.com/Pebaz/nimporter/tree/nimporter-v2.0.0rc

On this image, on the right code block, at the top,
it says calculatorlib.nim but has Python code inside, I think it should be calculatorlib.py ?.

  • Which versions of Python it supports ?.
@Pebaz
Copy link
Owner

Pebaz commented Jul 16, 2022

Oh good catch, thanks I will update it!

@juancarlospaco
Copy link
Contributor Author

@Pebaz
Hey the new 2.0.0 is working see here:

Any news of when is the merge?, right now I have to git clone to use it, because PIP installs the old one that is not really working.

🙂:+1:

@Pebaz
Copy link
Owner

Pebaz commented Jul 20, 2022

@juancarlospaco Thank you very much for testing this new branch out!

I've come across one wrinkle when trying to use Nimporter v2 with faster-than-requests. The now-formalized method of distributing extension modules & libraries doesn't work with external dependencies such as DLLs (at least not that I can think of without just rote copying each file).

If you've got any ideas on how to do this in a cross-platform way while still supporting 100% C source distributions, I'd be super interested. Here's my work on faster-than-requests here: https://github.com/Pebaz/faster-than-requests

I guess it could be possible to declare external C dependencies to Nimporter or something but I haven't thought of a good way.

If that is the case though, bear in mind that this means I can't really release Nimporter v2 since bringing Nim libraries (in any form) to the Python ecosystem is part of why it exists, DLLs or not ☹. Perhaps users could just modify the extensions they get from Nimporter v2 and add flags for the DLLs? How would this work with Windows headers/OpenGL headers/etc.

It's kind of a nightmare when dealing with C source distributions as far as I can tell. Nim made it so that those things were taken care of.

Lastly, I really wanted the process of exposing a Nim library to be "non-bespoke". What I mean is "not custom every time" or at least production-ready. I was attempting to get away from custom C build systems but I think I failed lol since I can't possibly support every use case.

@juancarlospaco
Copy link
Contributor Author

juancarlospaco commented Jul 20, 2022

Just pack the DLLs into the package itself ?.

Thats what other packages do, or you could just mention in the docs that you need to install the DLLs, thats similar for Linux and .so files too, so I think it is Ok.
On the repo I was thinking about removing the DLL anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants