Git Product home page Git Product logo

Comments (9)

michalk8 avatar michalk8 commented on May 19, 2024

Now that #178 is merged, I will focus on this.

from cellrank.

michalk8 avatar michalk8 commented on May 19, 2024

Hi, @flying-sheep,
I'm struggling to put CellRank on testpypi, the main culprit being here: https://github.com/theislab/cellrank/blob/master/setup.py#L42
The problem is this: HTTPError: 400 Client Error: Invalid value for requires_dist. Error: Can't have direct dependency: 'msmtools @ git+git://github.com/msmdev/msmtools@krylov_schur#egg=msmtools' for url: https://test.pypi.org/legacy/
This problem occures when I build bdist_wheel. If I only build sdist, it gets uploaded.
However, after running pip install -i https://test.pypi.org/simple/ cellrank==1.2.3.dev2,
I get the following error and I don't know how to fix it:

Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /home/michal/.miniconda3/envs/cellrank/bin/python /home/michal/.miniconda3/envs/cellrank/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-ant09w4q/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://test.pypi.org/simple/ -- setuptools setuptools_scm wheel
       cwd: None
  Complete output (3 lines):
  Looking in indexes: https://test.pypi.org/simple/
  ERROR: Could not find a version that satisfies the requirement setuptools (from versions: none)
  ERROR: No matching distribution found for setuptools
  ----------------------------------------
ERROR: Command errored out with exit status 1: /home/michal/.miniconda3/envs/cellrank/bin/python /home/michal/.miniconda3/envs/cellrank/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-ant09w4q/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://test.pypi.org/simple/ -- setuptools setuptools_scm wheel Check the logs for full command output.

Here's the full log.

Based on this, I'm not sure if it's even possible to specify dependency that way.
As far as I know, dependency_links could've worked (haven't tried them, they were deprecated).
Other thing I tried is using cmdclass in setup.py, calling pip install <the package>, similar to this, but it always fails with not being able to find pip:

Traceback (most recent call last):
      File "/home/michal/.miniconda3/envs/cellrank/bin/pip", line 7, in <module>
        from pip._internal.cli.main import main
    ModuleNotFoundError: No module named 'pip'

Any help on this would be greatly appreciated!

from cellrank.

Marius1311 avatar Marius1311 commented on May 19, 2024

In the meantime, I would vote for putting it on pypi without the msmtools dependency, include msmtools it in the installation instructions and initiate a merge of the krylov-schur branch into upstream msmtools.

from cellrank.

Marius1311 avatar Marius1311 commented on May 19, 2024

We could even let functions/methods default to CFLARE if no msmtools is found and print a message, urging the user to install msmtools...

from cellrank.

Marius1311 avatar Marius1311 commented on May 19, 2024

@flying-sheep, can you help us with this?

from cellrank.

flying-sheep avatar flying-sheep commented on May 19, 2024

The reason one can’t have URLs as dependencies is explained in pypa/pip#6301.

One option to solve this is to vendorize it, i.e. bundle the dependency with your package. One advantage is that other packages can depend on the regular version of msmtools while only you see and import from the version you need. This tool could help, I think it’s able to resolve and install from an URL since it uses pip.

The way it works is that you use the CLI command python-vendorize to install the package to a local (git-ignored) directory, and include that directory when building a package for PyPI.

I suggest you use an URL with a commit hash instead of the branch name in the URL. This way when building a package, you always get the same version and not whatever is the newest one at build time.

from cellrank.

michalk8 avatar michalk8 commented on May 19, 2024

@flying-sheep Thanks a lot!
That's what I was afraid of - bundling stuff together, but if it's the only solution, then so be it. There were some issues with docs + tests, but #225 should make it work.

from cellrank.

michalk8 avatar michalk8 commented on May 19, 2024

Done via #225 and later commit. Will create separate issue for Anaconda.

from cellrank.

Marius1311 avatar Marius1311 commented on May 19, 2024

Amazing, thanks so much.

from cellrank.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.