liftoff / pyminifier

Pyminifier is a Python code minifier, obfuscator, and compressor.
GNU General Public License v3.0
1.46k stars 222 forks source link

No "setuptools" or setup documentation #107

Open Fmstrat opened 6 years ago

Fmstrat commented 6 years ago

Fresh Raspbian system:

pi@raspberrypi:/tmp $ git clone https://github.com/liftoff/pyminifier.git
Cloning into 'pyminifier'...
remote: Counting objects: 204, done.
remote: Total 204 (delta 0), reused 0 (delta 0), pack-reused 204
Receiving objects: 100% (204/204), 92.38 KiB | 0 bytes/s, done.
Resolving deltas: 100% (129/129), done.
pi@raspberrypi:/tmp $ cd pyminifier/
pi@raspberrypi:/tmp/pyminifier $ python ./setup.py 
Traceback (most recent call last):
  File "./setup.py", line 3, in <module>
    from setuptools import setup
ImportError: No module named setuptools
pi@raspberrypi:/tmp/pyminifier $ python ./setup.py install
Traceback (most recent call last):
  File "./setup.py", line 3, in <module>
    from setuptools import setup
ImportError: No module named setuptools
pi@raspberrypi:/tmp/pyminifier $ python --version
Python 2.7.13
pi@raspberrypi:/tmp/pyminifier $ 

As a note, despite great documentation overall, there seems to be nothing on actually installing, other than:

When you install pyminifier...

No mention of the setup script, etc..

Thanks!

ericchansen commented 6 years ago

You're clearly missing setuptools. Use something like pip install setuptools or conda install setuptools (depending on what manager you're using) and then try again.

But yes, I agree that this could use more installation documentation. I can't seem to get it to install from source (only works with pip).

After installing from source, I get the following error. hello-world.py is just an example. I get this error regardless of what I do.

eric@ubuntu:~/test$ pyminifier hello-world.py 
Traceback (most recent call last):
  File "/home/eric/miniconda3/envs/test/bin/pyminifier", line 11, in <module>
    load_entry_point('pyminifier==2.2', 'console_scripts', 'pyminifier')()
  File "/home/eric/miniconda3/envs/test/lib/python3.6/site-packages/pyminifier-2.2-py3.6.egg/pyminifier/__main__.py", line 171, in main
  File "/home/eric/miniconda3/envs/test/lib/python3.6/site-packages/pyminifier-2.2-py3.6.egg/pyminifier/__init__.py", line 284, in pyminify
  File "/home/eric/miniconda3/envs/test/lib/python3.6/site-packages/pyminifier-2.2-py3.6.egg/pyminifier/minification.py", line 417, in minify
  File "/home/eric/miniconda3/envs/test/lib/python3.6/site-packages/pyminifier-2.2-py3.6.egg/pyminifier/minification.py", line 202, in reduce_operators
TypeError: 'NoneType' object is not subscriptable