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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file example_nim_pkg_stever-0.0.3-cp37-cp37m-win_amd64.whl.
File metadata
- Download URL: example_nim_pkg_stever-0.0.3-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 147.9 kB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
758c8e17f390dad4aa17459fb11a6ceb01c8b8918bab8173b27973349d3fee1e
|
|
| MD5 |
12a71dd79328d18892e27e61e0f820d5
|
|
| BLAKE2b-256 |
a4d47fc9ad4cbafdc89e1413acf272a71f41cf4a638dc0e60a3c35dcd432ca2e
|