Nimporter

Latest version: v2.0.0

Safety actively analyzes 681844 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

2.0.0rc

Complete Rewrite of Nimporter Core Functionality

There have been a large number of inconsistencies corrected, flaws remedied, and conventions standardized upon in order to make this the best version of Nimporter ever!

**Main Changes**

* **Nimporter can now be used to distribute *Source Distributions* of libraries without requiring the user to have a Nim compiler installed!** 🎉
* New logo
* Formalized why Nimporter chooses C compiler: when Importing, CC must match CC used to build Python. When Exporting, CC will either match the CC used to build Python (bdist_wheel) or will be one of many within a matrix of supported CCs (sdist)
* Removed `nimporter [bundle|build]`
* Nimporter is more formalized now. Extension Modules and Extension Libraries are first class notions now.
* Hashing and Caching is now supported for Libs & Modules correctly!
* Extension libraries must use structure defined in this [cookiecutter template](https://github.com/Pebaz/template-nimporter-ext-lib)
* If `NIMPORTER_INSTRUMENT` is in environment, compile output is printed for debugging
* Added [Semgrep](https://semgrep.dev/) in CI to scan for code patterns that could lead to security vulnerabilities

I believe everything in 60 has been addressed as it pertained to the rewrite.

SekouDiaoNlp juancarlospaco benjamin-lee retsyo paul-nameless ivan1248 philippeitis WesleyYue If any of you happen to have time, can you test the new functionality of Nimporter on any of your projects by installing this `v2.0.0rc` release?

Let me know any pain points you encounter if you chose to refactor and maybe things can be polished off. Also, there are a few things that are different in this version:

* Nim Extension Libraries have a specific folder structure (as noted in the new readme)
* Only Nim Extension Libraries can customize compiler switches
* Interactions with `setup.py` are slightly different
* The C compiler is customized automatically by Nimporter to improve cross-platform distribution
* More in the readme

I have a question regarding the utility of Python & Nim in regards to Nim binary dependencies. For instance, if some Nim code is using Raylib for example, would this work with a Binary Distribution? If so, I think I should update the readme to say that Source Distributions only support pure Nim code because of how they work now. Source Distributions precompile a bunch of different platform/architecture/CC combinations in order to allow users with those target triples to use their own CC to without having Nim installed. However, I think that this has some implications that may not be fully known at this time.

Let me know if there are any glaring bugs 🐞 and I'll work to fix them. I know this represents some breaking changes, but if Nimporter can gain the ability to allow Python users to install Source Distributions without installing a Nim compiler, that would be totally amazing! 🚀

1.1.0

What's Changed

* Fixed Issue with macOS build using 'd:lto' flag + Added support for `*.nim.cfg` and `*.nims` files to specify compiler flags. + Amended the README see 52 by SekouDiaoNlp in https://github.com/Pebaz/nimporter/pull/55
* Deprecating `switches.py` in favor of `*.nim.cfg` and `*.nims`

New Contributors
* SekouDiaoNlp made their first contribution in https://github.com/Pebaz/nimporter/pull/55

**Full Changelog**: https://github.com/Pebaz/nimporter/compare/v1.0.4...v1.1.0

1.0.4

Fixes:

37 40

1.0.3

New Features:

* Fixed bug where `exclude_dirs` argument in `build_nim_extensions()` was not being fully utilized.

1.0.2

New Features:

* Added new [`danger=True` flag to `build_nim_extensions()`](https://github.com/Pebaz/nimporter#increasing-speed-by-using-the--ddanger-flag)

1.0.1

**New Features**

* Added CLI command: `nimporter compile` which improves workflows related to compiling all Nim sources without running the application or bundling an application into a Zip archive without using a `setup.py`.

**Bug Fixes**

* Fixed `MANIFEST.in` not being deleted on `nimporter clean` if it resided in project root

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.