kipyin / pokemaster

Checkout kipyin/pokemaster2 !
https://github.com/kipyin/pokemaster2
2 stars 2 forks source link

`pip install pokemaster` failure #10

Closed kipyin closed 5 years ago

kipyin commented 5 years ago

pip install pokemaster does not work:

$ pip install pokemaster
...
Collecting pokedex (from pokemaster)
  Could not find a version that satisfies the requirement pokedex (from pokemaster) (from versions: )
No matching distribution found for pokedex (from pokemaster)
...

I've searched all existing issues on poetry and cannot find a solution to this (or even a relevant issue). I think pokedex should be shipped with pokemaster.

kipyin commented 5 years ago

The issue with shipping pokedex with pokemaster:

  1. Too many files (all the csv data).
  2. Getting and setting the default database will require extra work (exponentially).

So, nah. I think I'll try to fix this issue on the PyPI side.

kipyin commented 5 years ago

Note: pip install git+https://github.com/veekun/pokedex works. How should I put this into pyproject.toml?

kipyin commented 5 years ago

So this is actually an issue with poetry, who strips the git dependencies when building the package. I can:

  1. Wait for a fix.
  2. Make PR to poetry. But I have no idea how to fix the wheel part.
  3. Use requirements.txt for now.
kipyin commented 5 years ago

Installing pokedex separately can also be a solution.

We can make it easier by incorporating pip install git+<pokedex.git> in tasks.py, like:

def install(c):
    c.run("pip install git+https://github.com/veekun/pokedex")
    c.run("poetry install -v")

If so, construct dependency can be removed from the main requirements, along with many other benefits.

kipyin commented 5 years ago

With this maybe we can finally do pip install pokemaster:

$ pip install git+https://github.com/veekun/pokedex
...
$ pip install pokemaster

Then all we need to worry about is installing pokedex to the right virtualenv.

kipyin commented 5 years ago

I think this is solved with 7c4845b and fd9453b.