Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize modules #137

Open
xordspar0 opened this issue Jun 5, 2020 · 2 comments
Open

Reorganize modules #137

xordspar0 opened this issue Jun 5, 2020 · 2 comments

Comments

@xordspar0
Copy link
Contributor

As I have been working on packaging Gearhead for the AUR, I noticed that the modules in Gearhead like game and gears get installed directly to site-packages:

$ python setup.py install --root=. --prefix=/usr
$ tree -L 4 usr
usr
├── bin
│   └── ghcaramel
└── lib
    └── python3.8
        └── site-packages
            ├── game
            ├── gears
            ├── ghcaramel-0.520-py3.8.egg-info
            ├── main.py
            ├── pbge
            ├── pbgerecolor.cpython-38-x86_64-linux-gnu.so
            └── __pycache__

Now when I install this package on my system, if I start the Python interpreter and do import game I get the Gearhead game module. 😄

I think the way to fix this is to move all of the modules under an additional gearhead-caramel directory, like this:

gearhead-caramel
├── setup.py
├── gearhead-caramel
│   ├── main.py
│   ├── game
│   ├── gears
│   ├── pbge
│   └── ...
... other top level things ...
@jwvhewitt
Copy link
Owner

I think it should be possible to get setup.py to do this without reformatting all the modules; in this case I think that moving the game, pbge, and gears modules to py_modules instead of packages should do the trick. I will look into this.

To be honest, I haven't touched setup.py for GHC since the absolute beginning of development and have instead relied upon PyInstaller for distribution. It's probably a mess.

@xordspar0
Copy link
Contributor Author

Thanks! I'll let you know if I find out anything.

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

No branches or pull requests

2 participants