nimporter: Problems implementing nimporter

  • I am trying to migrate https://github.com/juancarlospaco/faster-than-requests
  • The project is older than Nimporter and I didnt have the time before. I need to build for Windows, Mac, Linux.
  • I have made a PR were I deleted everything and only left the basic files, the .py and .nim files.

I have several errors but I dont know whats the problem, they all just exit on the GitHub Actions CI with:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
IndexError: list index out of range

It does not fully finish correctly, always fails on 1 of the 3 operating systems. I guess something is failing to build the files, but the error message is confusing. Maybe can you take a quick look at the branch and help me with the errors?:

🙂

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 28 (28 by maintainers)

Most upvoted comments

This is an interesting problem. I was able to successfully bundle Nim files into a source distribution by simply removing the include_package_data=True line from setup.py. No idea why that would work but try it out and let me know if it works for you and I’ll update the source distribution instructions in the readme:

setup(
    ...,                            # Keep your existing arguments
    package_data={'': ['*.nim']},   # Distribute Nim source files
    # include_package_data=True, <- Remove just this line
    install_requires=[
        'nimporter',  # Must depend on Nimporter
        'choosenim_install'  # Optional. Auto-installs Nim compiler
    ]
)

Fantastic, glad this worked out!