Files
sthen c1be514f09 lfm: use MODPY_PYBUILD, some fiddling required to get files
installed to the right dirs

add setuptools RDEP, this uses pkg_resources (it was relying on old
python.port.mk adding this RDEP automatically which was disabled some
time ago).
2024-11-15 13:32:14 +00:00

45 lines
1.6 KiB
Plaintext

Install the manpage and docs according to our file hierarchy, otherwise:
* the manpage was installed in /usr/share/man/man1
* doc files were in sites-packages, now they're in ${LOCALBASE}/share/doc/lfm;
see also patch-lfm_actions_py
* default config files are needed in sites-packages in case $HOME/.config/lfm
is empty, and can be restored through a runtime option. There is no need for @sample
entries in PLIST since lfm reads its configuration files in ~/.config/lfm only.
Index: setup.py
--- setup.py.orig
+++ setup.py
@@ -45,16 +45,9 @@ if ver < (3, 4):
print('ERROR: Python 3.4 or higher is required to run lfm.')
exit(-1)
-# to avoid bug in pip 7.x. See https://bitbucket.org/pypa/wheel/issues/92
-if 'bdist_wheel' in argv:
- raise RuntimeError("This setup.py does not support wheels")
-
import shutil
try:
try:
- os.mkdir('lfm/doc')
- for f in DOC_FILES:
- shutil.copy2(f, 'lfm/doc')
os.symlink('../etc', 'lfm/etc')
except:
pass
@@ -71,11 +64,12 @@ try:
license='GPL3+',
packages=['lfm'],
scripts=['lfm/lfm'],
- data_files=[(join(prefix, 'share/man/man1'), MAN_FILES)],
- package_data={'': CONFIG_FILES + [join('doc', f) for f in DOC_FILES]},
+ data_files=[(join(prefix, 'man/man1'), MAN_FILES),
+ (join(prefix, 'share/doc/lfm'), DOC_FILES),
+ ],
+ package_data={'': CONFIG_FILES},
)
finally:
- shutil.rmtree('lfm/doc')
try:
os.unlink('lfm/etc')
except IsADirectoryError: