kipyin/pokemaster

`pip install pokemaster` failure

Closed this issue · 6 comments

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.

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.

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

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.

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.

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.

I think this is solved with 7c4845b and fd9453b.