slowkow / harmonypy

🎼 Integrate multiple high-dimensional datasets with fuzzy k-means and locally linear adjustments.
https://portals.broadinstitute.org/harmony/
GNU General Public License v3.0
198 stars 22 forks source link

Build changes have broken Conda install #21

Closed pinin4fjords closed 1 year ago

pinin4fjords commented 1 year ago

The conda package build no longer works with the latest release, CI produces errors like:

...
09:54:24 BIOCONDA INFO (OUT) Processing $SRC_DIR
09:54:24 BIOCONDA INFO (OUT)   Added file://$SRC_DIR to build tracker '/tmp/pip-build-tracker-xqauy_ow'
09:54:24 BIOCONDA INFO (OUT)   Running setup.py (path:$SRC_DIR/setup.py) egg_info for package from file://$SRC_DIR
09:54:24 BIOCONDA INFO (OUT)   Created temporary directory: /tmp/pip-pip-egg-info-9vdginkf
09:54:24 BIOCONDA INFO (OUT)   Running command python setup.py egg_info
09:54:24 BIOCONDA INFO (OUT)   Preparing metadata (setup.py): started
09:54:25 BIOCONDA INFO (OUT)   Traceback (most recent call last):
09:54:25 BIOCONDA INFO (OUT)     File "<string>", line 2, in <module>
09:54:25 BIOCONDA INFO (OUT)     File "<pip-setuptools-caller>", line 34, in <module>
09:54:25 BIOCONDA INFO (OUT)     File "/opt/conda/conda-bld/harmonypy_1669197095540/work/setup.py", line 3, in <module>
09:54:25 BIOCONDA INFO (OUT)       with open("README.md", "r") as fh:
09:54:25 BIOCONDA INFO (OUT)            ^^^^^^^^^^^^^^^^^^^^^^
09:54:25 BIOCONDA INFO (OUT)   FileNotFoundError: [Errno 2] No such file or directory: 'README.md'
09:54:25 BIOCONDA INFO (OUT)   error: subprocess-exited-with-error
09:54:25 BIOCONDA INFO (OUT) 
09:54:25 BIOCONDA INFO (OUT)   × python setup.py egg_info did not run successfully.
09:54:25 BIOCONDA INFO (OUT)   │ exit code: 1
09:54:25 BIOCONDA INFO (OUT)   ╰─> See above for output.
...

Conda installs the package from the PyPi source (not directly from here) like:

python -m pip install . --no-deps --ignore-installed -vv

I'm thinking the issues may be due to recent build changes like https://github.com/slowkow/harmonypy/commit/472c15bda63d8ad8244ad2bc24ec66fbb5925ed9, and the fact that README.md is both included and excluded here: https://github.com/slowkow/harmonypy/blob/master/MANIFEST.in.

slowkow commented 1 year ago

Hey Jonathan, apologies for the error. My mistake.

I'm still learning how to wrangle the build system for python packages ... I spent a few hours last night unsuccessfully trying various Stackoverflow answers. After many failed attempts, it seems like Manifest.in is the only option to make a build that excludes data/ and tests/.

Pull requests for re-organizing the code to make it meet users' and developers' expectations are more than appreciated.