aghast icon indicating copy to clipboard operation
aghast copied to clipboard

Standard package layout

Open henryiii opened this issue 5 years ago • 5 comments

Could this follow standard Python layout? The following line should install the package:

pip install git+https://github.com/scikit-hep/aghast.git

But it doesn't since this does not follow standard layout. We have to use:

pip install git+https://github.com/scikit-hep/aghast#subdirectory=python

henryiii avatar May 21 '20 17:05 henryiii

The problem is because this wasn't primarily intended to be a Python library, though "python" is the only language-dependent subdirectory that now exists. Seeing as it will be a long time before it gets lowered to C++, it would be fine to restructure it as a standard Python library.

jpivarski avatar May 21 '20 18:05 jpivarski

The two can coexist fairly nicely, that is, setup.py/setup.cfg/pyproject.toml/MANIFEST.in at the top and "python/aghast" instead of "src/aghast", then the rest of the parts can sit in the top namespace, since they don't collide. However, if there's good reason for it not to be a normal python library, that's fine too - didn't realize/forgot about the non-Python part.

henryiii avatar May 21 '20 18:05 henryiii

It was originally going to be a suite of languages, in which Python shouldn't get a distinguished spot in "src". Even though adding C++ would technically take it closer to that goal, I'll be narrowing the scope to a C++ driver with Python interface. If someone wants to write the Julia bindings, that's up to them (and maybe shouldn't be the same repo, anyway). In other words, the structure will be similar to Awkward1.

If renaming the "python' directory as "src" is all that's needed, let's do it. Do you know of anything that would also need to change? (I don't remember. Possibly, the deployment to PyPI would need to change.)

jpivarski avatar May 21 '20 18:05 jpivarski

We could leave the directory name as python, we just would need to move the packaging tools (setup.* etc) to the top level.

henryiii avatar May 21 '20 18:05 henryiii

See https://scikit-hep.org/developer/packaging - just change src to python when reading it.

henryiii avatar May 21 '20 18:05 henryiii