package_data work notes
Thursday, November 09, 2017
package_data is needed for additional package files, and data_files for files outside your package like command line scripts or system config files.
From <https://stackoverflow.com/questions/24347450/how-do-you-add-additional-files-to-a-wheel>
So
- package_data for icons, external scripts, text files and so on that are inside the module tree --> $root/leo/*
- data_files for extra files that are outside the module tree --> $root/* and $root/data/*
-----
leoDist: some external files missing when installed by pip #573
From <https://github.com/leo-editor/leo-editor/issues/573>
Installing Leo from GitHub via pip does not work #847
From <https://github.com/leo-editor/leo-editor/issues/847>
Problem
When installing Leo from GitHub with pip install https://github.com/leo-editor/leo-editor/archive/devel.zip numerous files are left out. See #847 (comment)
Solution
Installing from Github into a new environment must be done in discrete steps: download, unpack, and install in editable mode.
Example:
wget https://github.com/leo-editor/leo-editor/archive/devel.zip
7z x devel.zip -o C:\apps
pip install --editable C:\apps\leo-editor-devel
On Windows there are powershell versions of wget if needed.
For easier upgrading substitute git clone for wget & 7z steps:
git clone --single-branch -b devel --depth=100 https://github.com/leo-editor/leo-editor.git
pip install --editable leo-editor
time passes, upgrade desired:
pushd c:\apps\leo-editor
git pull
single-branch, b and depth are all optional, but will dramatically speed up download time as it only grabs the latest development branch and skips all but the last couple weeks or months of history.
From <https://github.com/leo-editor/leo-editor/issues/847>
Many many files are being left out when pip installing via GitHub. There are 14 folders under {source_root}\leo
but only 6 are installed in PYTHONHOME\...\site-packages\leo
. It's supposed to be 12, as only test and doc are to be excluded according to MANIFEST.in.
This appears to be a new face on #603. More research on-going, just posting a status update.
From <https://github.com/leo-editor/leo-editor/issues/847>