Skip to content

Releases: Pebaz/nimporter

Nimporter Version v2.0.0rc

26 Mar 08:37
e1aaddf
Compare
Choose a tag to compare
Pre-release

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
  • If NIMPORTER_INSTRUMENT is in environment, compile output is printed for debugging
  • Added Semgrep 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! 🚀

Version 1.1.0

05 Nov 22:16
Compare
Choose a tag to compare

Minor Version Release v1.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 #55
  • Deprecating switches.py in favor of *.nim.cfg and *.nims

New Contributors

Full Changelog: v1.0.4...v1.1.0

Version 1.0.4

14 Feb 20:47
Compare
Choose a tag to compare

Version 1.0.3

14 Feb 18:14
Compare
Choose a tag to compare

New Features:

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

Version 1.0.2

03 Aug 14:18
Compare
Choose a tag to compare

Version 1.0.1

26 May 13:34
Compare
Choose a tag to compare

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

v1.0.0

11 Apr 15:33
Compare
Choose a tag to compare

Major Release v1.0.0

After 2 months of hard work, I am proud to announce the release of Nimporter version 1.0.0! I have now implemented all of features necessary to consider Nimporter complete but will continue to provide bug fixes and small enhancements as they become necessary. The greatest feature in this release is the ability to distribute libraries using Nim code without requiring the end user to install a Nim compiler. Here is a list of the new features introduced in this version:

  • Distribute libraries with Nim code without requiring end users to install a Nim compiler!
  • Much easier installation: pip install nimporter.
  • Nimporter can work with Nim installed via Choosenim or manually.
  • Nimporter finds Nim standard library automatically.
  • Entire Nim projects with .nimble dependencies are now officially supported.
  • Binary (wheel) distributions are officially supported and are effortless to create (1 extra line of code).
  • Source distributions now directly imply that they contain bundled Nim source files.
  • Absolute control over CLI args are 100% supported for an arbitrary number of platforms and situations.
  • Arbitrarily complex namespacing is maintained for libraries packaged with Nim code.
  • 44 unit tests and 5 integration tests.
  • 94% code coverage
  • Official Nimporter CLI for cleaning cached builds and compiling extensions in the terminal.
  • Generated documentation.
  • New logo. 😃

There is now no excuse not to make your Python code more performant using Nim. All of the hard work has been done for you: simply plop a Nim source file into your project, import nimporter, and then directly import your Nim code. You can now think of Nimporter as Cython for Nim, but seamless.

Furthermore, none of your end users have to install a Nim compiler (or a C compiler for that matter). Distribution is 1 extra line of code.

Using Nim with Python now involves the same effort as writing pure Python.

Welcome to Nimporter 1.0.0.

Release version 0.1.5

26 Dec 15:24
Compare
Choose a tag to compare

Includes changes from

Changelog

  • Bugfix: Fixed bug when importing importlib.util as noted here.
  • Improvement: Improved breadth of supported Python versions by using custom hash function rather than importlib.util.source_hash() introduced in Python 3.7+.

Release version 0.1.4

21 Dec 00:19
Compare
Choose a tag to compare

Includes changes from

Changelog

  • Bugfix: Fix critical bug on Windows caused by Nim outputting MSVC banner to STDERR which would be raised as an exception by Nimporter.

Release version 0.1.3

18 Dec 02:48
Compare
Choose a tag to compare

Includes changes from

Changelog

  • Improvement: Added documentation on how to distribute Nim source files along with a library.
  • Improvement: Nimporter now has a IGNORE_CACHE parameter that forces the rebuild of any Nim file while set.
  • Bugfix: Libraries distributed with Nim source files can now import those files using relative paths.