googlevr / tilt-brush-toolkit

Scripts and assets that help you use Tilt Brush data in your creative projects.
Apache License 2.0
744 stars 164 forks source link

Transform Python code to a PyPi package. #7

Closed Sitin closed 7 years ago

Sitin commented 7 years ago

This one is intended to resolve #6.

Before merging this PR we may decide the following:

dubois commented 7 years ago

We have no current plans to publish to PyPI.

We might accept a very simple PR that allows end-users to run "setup.py install" as a maybe-more-convenient way to get the code into sys.path. But the expected use case is for artist/makers to update by pulling straight from git and modifying sys.path or PYTHONPATH

Sitin commented 7 years ago

So, we can merge this one.

Since I believe that

pip install -e Python/

is a better and more obvious and concise way to install the tool.

andybak commented 7 years ago

But the expected use case is for artist/makers to update by pulling straight from git and modifying sys.path or PYTHONPATH

That's a very strange way to use Python package. Even the most basic Python tutorials recommend virtualenv and pip.

Sitin commented 7 years ago

This is a native pip solution and it works for virtualenvs as well. Python/ here is the location for the Python part of the toolkit relative to the repository root.

dubois commented 7 years ago

Hi, thanks for your input. I don't want to accept dependencies on anything which doesn't come with Python. So, no setuptools in the code (distutils is ok). The docs should not rely on pip (mentioning it as an alternate approach is ok).

Rationale: not all people using this are going to be Python users, or even be interested in doing things the Python way, let alone be interested in the vagaries of the Python packaging ecosystem. Additional process complexity is undesirable.

bin/ directory should not be moved; it uses the python modules, but should not be part of the module.

I feel like this is a minor improvement at best; unless you feel really strongly about it let's do at most one more back and forth before resolving one way or another.

andybak commented 7 years ago

You make a good point. But doesn't pip come built in with Python now? It's so long since I've started from a clean machine I don't know - but I thought "standard practice" and "base install" had converged.

dubois commented 7 years ago

Yeah, pip still requires the use of finding + downloading "get_pip.py". Might be standard with python 3, but all our development is still 2.7.x.