example-nim-pkg-stever-0.0.3
توضیحات
A small example package with Nim module
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | example-nim-pkg-stever-0.0.3 |
| نام | example-nim-pkg-stever |
| نسخه کتابخانه | 0.0.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Steven Robertson |
| ایمیل نویسنده | stever@hey.com |
| آدرس صفحه اصلی | https://github.com/stever/example-nim-pip-pkg |
| آدرس اینترنتی | https://pypi.org/project/example-nim-pkg-stever/ |
| مجوز | - |
# 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`.
```bash
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
```bash
cd py_module_nim/
pip install twine
twine upload dist/*
```
## Example using package
Write the following Python script to file named `try.py`:
```python
from example_nim_pkg import mymodule
print(mymodule.greet("World"))
```
Install the `example-nim-pkg-stever` package and run the script:
```bash
pip install example-nim-pkg-stever
python try.py
```
نحوه نصب
نصب پکیج whl example-nim-pkg-stever-0.0.3:
pip install example-nim-pkg-stever-0.0.3.whl
نصب پکیج tar.gz example-nim-pkg-stever-0.0.3:
pip install example-nim-pkg-stever-0.0.3.tar.gz