meejah / txtorcon

Twisted-based asynchronous Tor control protocol implementation. Includes unit-tests, examples, state-tracking code and configuration abstraction.
http://fjblvrw2jrxnhtg67qpbzi45r7ofojaoo3orzykesly2j3c2m3htapid.onion/
MIT License
250 stars 72 forks source link

Build error with python-2.7 #321

Closed yurivict closed 4 years ago

yurivict commented 6 years ago
writing byte-compilation script '/tmp/tmpmI3IIE.py'
/usr/local/bin/python2.7 -O /tmp/tmpmI3IIE.py
  File "/usr/local/lib/python2.7/site-packages/txtorcon/controller_py3.py", line 13
    async def __aenter__(self):
            ^
SyntaxError: invalid syntax

Version: 18.3.0 OS: FreeBSD 11.2 Found in the FreeBSD port.

meejah commented 5 years ago

Can you describe how you get this error? Seems like possibly an issue with the FreeBSD ports, because "controller_py3.py" should only be imported from Python3.

yurivict commented 5 years ago

This error messages appear during the FreeBSD port build that runs with python-2.7.

It runs the command python2.7 setup.py with environment variables set to install it into a particular prefix, etc.

meejah commented 5 years ago

Hmm, okay. I wonder if the Debian method of packaging txtorcon gives any hints to something I can provide in setup.py to help with this ... I don't know of any "standard" way of excluding files from source for "only Python3" or so.

yurivict commented 5 years ago

Package building succeeds even after these errors are printed.

meejah commented 4 years ago

Python 2 is officially EOL now anyway, and this doesn't apparently prevent building.