forked from jeetsukumaran/DendroPy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNOTES.txt
47 lines (31 loc) · 1.87 KB
/
NOTES.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"SyntaxError: invalid syntax" with setuptools Installed scripts
===============================================================
Problem
-------
After installation using "python setup.py install" or "python setup.py develop",
some scripts fail with an "SyntaxError: invalid syntax" error.
E.g.::
Traceback (most recent call last):
File "/opt/python-2.5.2-universal/bin/sumtrees.py", line 5, in <module>
pkg_resources.run_script('DendroPy==2.0.0', 'sumtrees.py')
File "/opt/python-2.5.2-universal/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/pkg_resources.py", line 448, in run_script
File "/opt/python-2.5.2-universal/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/pkg_resources.py", line 1172, in run_script
File "/opt/python-2.5.2-universal/lib/python2.5/site-packages/DendroPy-2.0.0-py2.5.egg/EGG-INFO/scripts/sumtrees.py", line 483
SyntaxError: invalid syntax
The scripts work fine when run directly.
Cause
-----
Trailing (or leading) spaces on blank lines at the end of the file. For some
reason, this confuses setuptools.
Solution
--------
Make sure that apparently blank lines are truly empty: i.e., strip all trailing
spaces from lines.
Variation and Idiosyncrasies in Files Packaged with setuptools
===============================================================
When running setuptools "python setup.py sdist", there might be some apparent randomness in the files packaged.
1. Delete the automatically-created package egg-info in the root directory::
rm -rf DendroPy.egg-info
to remove file entries from previous configurations.
#. setuptools monitors files tracked by version control systems, such as CVS and GIT. An optional plug-in adds in files tracked by Git. All of this may or may not be a good thing!
#. The MANIFEST.in file explicitly controls files added to the source distribution package.