eyeonus / Trade-Dangerous

Mozilla Public License 2.0
96 stars 31 forks source link

Relocate importable files into their own folder #137

Closed kfsone closed 2 months ago

kfsone commented 2 months ago

Since 3.something Python often gets irritable when you have top-level and import scripts in the same path. This causes some weirdness when developing because trade.py has this:

from tradedangerous import cli

but trade.py is inside the tradedangerous folder; so there's the potential that a shenanigan'd virtual or conda env might import from a different tradedangerous folder than the local one...

Common solutions are:

eyeonus commented 2 months ago

Option 2. We'll have to move both trade.py and tradegui.py, and fix the entry points in setup.py:

        entry_points = {
            "console_scripts": [
                "trade=tradedangerous.trade:main",
                "tradegui=tradedangerous.tradegui:main"
            ]
        },