A small example package with Nim module
Project description
Example Package with Nim
This is a simple example package with Nim module.
Build steps
NOTE: These build steps are using Linux/macOS or similar. For Windows, the Nim
module will be compiled to mymodule.pyd
instead of mymodule.so
.
cd py_module_nim/example_pkg/
nimble install nimpy
nim compile --threads:on --app:lib --out:mymodule.so mymodule
cd ..
virtualenv venv
source venv/bin/activate
python setup.py sdist bdist_wheel
Publish steps
cd py_module_nim/
pip install twine
twine upload dist/*
Example using package
Write the following Python script to file named try.py
:
from example_nim_pkg import mymodule
print(mymodule.greet("World"))
Install the example-nim-pkg-stever
package and run the script:
pip install example-nim-pkg-stever
python try.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for example_nim_pkg_stever-0.0.3-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 758c8e17f390dad4aa17459fb11a6ceb01c8b8918bab8173b27973349d3fee1e |
|
MD5 | 12a71dd79328d18892e27e61e0f820d5 |
|
BLAKE2b-256 | a4d47fc9ad4cbafdc89e1413acf272a71f41cf4a638dc0e60a3c35dcd432ca2e |