C Extension that works with pip install#8
Open
justengel wants to merge 5 commits intospace-physics:mainfrom
Open
C Extension that works with pip install#8justengel wants to merge 5 commits intospace-physics:mainfrom
justengel wants to merge 5 commits intospace-physics:mainfrom
Conversation
… wmmsub function now calls wmmsub_f function. C doesn't support overloading without a lot of junk.
…an optional wmm_filename.
…d ctypes LoadLibrary into build.py. Made load library to only run when calling the function for the first time and not on import. Moved SDIR to this_path to support old compatibility layers.
…hout building the C Extension. This allows the old build method to still be supported.
|
Thank you! I managed to install your extension in a simple way. :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I created a C Extension. If you have the Visual Studio compilers installed, you can just pip install. See Also https://wiki.python.org/moin/WindowsCompilers. I also created
wmm2020_cexton pypi.org. This library has published compiled ".whl" files for Windows Python37-39. Build the wheel files withpython setup.py bdist_wheelAlso, removed the static path for WMM.COF and added it as a function argument.
You don't have to add this, but it is really helpful. I couldn't install your library. It looks like it uses MinGW instead of Visual Studio. Python is compiled with Visual Studio on Windows, so the best convention is to compile supporting libraries with Visual Studio for Windows. Also, if you use a C Extension Python will handle the compilation for you. No need for Makefiles. Additionally, the Makefile and build approach installs the .c, .h, and Makefiles with the Python library and forces the user to compile the library. When you compile the C Extension into .whl files you only need to bundle the .py and compiled .pyd files. This allows users to simply pip install unless they are running an OS that you did not compile .whl files for. In that case they can install the Python dev/build tools and pip install. Python will take care of compiling and installing the library which just makes it easier.