Valentyn Tymofieiev created BEAM-6665:
-----------------------------------------

             Summary: SDK source tarball is different when created on Python 2 
and Python 3
                 Key: BEAM-6665
                 URL: https://issues.apache.org/jira/browse/BEAM-6665
             Project: Beam
          Issue Type: Sub-task
          Components: sdk-py-core
            Reporter: Valentyn Tymofieiev


When we create a source tarball via `python setup.py sdist`  on Python 2, the 
generated protocol buffer code includes relative imports.

Because of that, a tarball created on Python 2 interpreter cannot be used on 
Python 3.

AFAIK, we release only one source tarball to PyPi, so if possible we should 
make source distribution of Beam compatible both with Python 2 and Python 3. 

When we create a source tarball on Python 3, we call futurize on generated 
_.pb2.py files[1]. Looks like this does not happen on Python 2, which we can 
fix in this issue.

[[1] 
https://github.com/apache/beam/blob/d6dc3602c808ce1961f46098deb898e5c7480ad4/sdks/python/gen_protos.py#L122|https://github.com/apache/beam/blob/d6dc3602c808ce1961f46098deb898e5c7480ad4/sdks/python/gen_protos.py#L122]
 

cc [~altay], [[email protected]], [~RobbeSneyders]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to