EscVM / OIDv4_ToolKit

Download and visualize single or multiple classes from the huge Open Images v4 dataset
GNU General Public License v3.0
809 stars 635 forks source link

Register and upload to PyPI #52

Closed monocongo closed 5 years ago

monocongo commented 5 years ago

I'd like to get the package installed into my Python virtual environment from PyPI via something along the lines of pip install oid_toolkit.

I may be able to cook this up myself and submit a PR once it's done, but if the developers in charge can give me any guidance on making that happen then please advise.

BTW (in case this helps) when I've done this before for projects of my own I've followed the relevant Real Python tutorial:

  1. Get the setup.py file in shape
  2. $ rm -rf dist
  3. $ python setup.py sdist bdist_wheel
  4. $ twine check dist/*
  5. $ twine upload --repository-url https://test.pypi.org/legacy/ dist/*
  6. $ twine upload dist/*
monocongo commented 5 years ago

I have tried installing from this repository but it looks like this won't work due to a missing setup.py file:

$ pip install git+https://github.com/EscVM/OIDv4_ToolKit
Collecting git+https://github.com/EscVM/OIDv4_ToolKit
  Cloning https://github.com/EscVM/OIDv4_ToolKit to /tmp/pip-req-build-0i4f19ry
  Running command git clone -q https://github.com/EscVM/OIDv4_ToolKit /tmp/pip-req-build-0i4f19ry
    ERROR: Command errored out with exit status 1:
     command: /home/james/miniconda3/envs/dataset_weapons/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-0i4f19ry/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-0i4f19ry/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: /tmp/pip-req-build-0i4f19ry/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/james/miniconda3/envs/dataset_weapons/lib/python3.7/tokenize.py", line 447, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-req-build-0i4f19ry/setup.py'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
keldrom commented 5 years ago

Maybe in future we'll do an installer for pip but for now is not one of the objective