Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > de.comp.lang.python > #5721

[Python-de] develop/editable-mode und "flaches" Package in "src"

From Hartmut Goebel <h.goebel@crazy-compilers.com>
Newsgroups de.comp.lang.python
Subject [Python-de] develop/editable-mode und "flaches" Package in "src"
Date 2021-03-05 09:52 +0100
Organization crazy-compilers.com
Message-ID <mailman.49.1614934352.3067.python-de@python.org> (permalink)
References <88603586-03f4-2c50-4bd8-f53523dbb3bb@crazy-compilers.com>

Show all headers | View raw


Hallo zusammen,

ich habe eine etwas ungewöhnliche Paketstruktur:

.
├── setup.cfg
├── src
│   └── __init__.py
└── some_release_helper.py

Sowie in setup.cfg definiert:

[options]
packages = trytond.modules.country_order
package_dir =
     trytond.modules.country_order=src

Was funktioniert: sdist, bdist und bdist_wheel funktionieren wie 
gewünscht: Das Package __init__.py landet in 
trytond/modules/country_order/__init__.py. und wenn ich es normal 
installiere, landen die Datein dort, wo sie hingehören.

*Was nicht funktioniert*: Wenn ich das Paket mit "pip install -e ." 
installiere:

  * zeigt die "trytond-country-order.egg-link" *nicht* auf das "src"
    Verzeichnis
  * wird "trytond_country_order.egg-info" im Projekt-Verzeichnis angelegt

Das resultat ist, dass das Module nicht gefunden wird.

*Irgendwelche Ideen, woran das liegen könnte?*

Falls sich jemand über das etwas *ungewöhnliche Directory-Layout 
wundert*: Tryton-Module haben dieses Layout, nur ohne "src" Directory. 
Beispiel: <https://hg.tryton.org/modules/country/file/tip>. Da ich auf 
oberster Verzeichnis-Ebene ein paar Module habe, die nicht in das bdist 
sollen, möchte ich den eigentlichen Packet-Inhalt in das Verzeichnis 
"src" verschieben.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

Back to de.comp.lang.python | Previous | Next | Find similar


Thread

[Python-de] develop/editable-mode und "flaches" Package in "src" Hartmut Goebel <h.goebel@crazy-compilers.com> - 2021-03-05 09:52 +0100

csiph-web