I write and maintain a Python library for calculating quantum chemistry called PyQuante . I have a pretty standard Python distribution with the setup.py file in the main directory, a subdirectory called "PyQuante" that contains all the Python modules and one called "Src", which contains the source code for the C extension modules.
I was fortunate that some users donated code that uses Cython, which I had not used before, since I started PyQuante before it or Pyrex existed. At my suggestion, they placed the code in the Src subdirectory, since all the C codes went there.
However, looking at the code that generates extensions, I wonder if I should just put the code in a subdirectory of the Python branch. And so my question is:
What are the best methods for directory structure of python distributions with Python and Cython source files?
- Do you put .pyx files in the same directory as .py files?
- Do you put them in a subdirectory of the one that contains the .py files?
- Do you put them in a child of the parent directory .py?
Is the fact that I even ask this question betrayed my ignorance in distributing .pyx files? I am sure there are many ways to make this work, and I am mostly concerned about what works best for people.
Thanks for any help you can offer.
source share