Skip to content

Conversation

swistakm
Copy link
Member

@swistakm swistakm commented Aug 8, 2017

Added option to create sdist packages:

  • Include both Cython sources and plain Cython-generated C++ sources in sdist archives with proper MANIFEST.in template,

  • Add option to install imgui with Cython compilation using extras_require:

    pip install imgui[Cython]
    

    With this extras option Cython package will be included as requirements. If it is available during imgui sdist package instalation then setuptools will compile Cython sources (.pyx, .pxd files) to C++ sources and only then perform final compilation.

  • Add helper makefile target that will be used during actual code distribution on PyPI,

This change has small caveat: it will work as intended (Cython will be used with extras uption during sdist installation) only if user does not have wheel package installed. Still, this shouldn't be an issue because:

  • Our main goal is to ship fully working wheels and not sdists. The sdists distributions are just a fallback mechanism for certain some OS/environments where our wheels may not work properly.
  • The users of wheel package will in most cases download wheels without knowing that there is sdist distribution
  • The sdist distribution includes generated C++ sources too so the final compilation is possible even without Cython installed.

@swistakm
Copy link
Member Author

swistakm commented Aug 8, 2017

@stuaxo, could you take a look at this as a follow-up to #39?

@coveralls
Copy link

Coverage Status

Coverage remained the same at 47.969% when pulling 4da7f90 on feature/self-contained-sdist-packages into 96b8bd6 on master.

@swistakm swistakm merged commit 34e0d3a into master Aug 10, 2017
@swistakm swistakm deleted the feature/self-contained-sdist-packages branch August 10, 2017 08:55
@stuaxo
Copy link
Contributor

stuaxo commented Aug 10, 2017

Should get some time on the weekend. I guess we need tests for both kinds (with and without cython). I don't know enough about python use with native libraries to know if the extra effort is worth it, but it does seem to be recommended for cython based libraries?

@swistakm
Copy link
Member Author

OK, so let's test and review it later. The best way to see if it works is to finally release it on PyPI and see if users have any troubles with installing the package on their machines. I have waited too long with initial official release.

@stuaxo
Copy link
Contributor

stuaxo commented Aug 10, 2017

Definitely - I don't want to delay anything + am especially keen to have something to test from Pypi.

@swistakm
Copy link
Member Author

Great. I have just released it officially.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants