[ 
https://issues.apache.org/jira/browse/AVRO-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16678864#comment-16678864
 ] 

ASF GitHub Bot commented on AVRO-2240:
--------------------------------------

Fokko closed pull request #347: AVRO-2240 Fix py3 Setup
URL: https://github.com/apache/avro/pull/347
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/lang/py3/setup.py b/lang/py3/setup.py
index 38f711798..c96e08f9c 100755
--- a/lang/py3/setup.py
+++ b/lang/py3/setup.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 # -*- mode: python -*-
 # -*- coding: utf-8 -*-
 
@@ -18,21 +18,26 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+"""
+Provide the code necessary for packaging and installing avro-python3.
+
+The avro-python3 software is designed for Python 3, but this file and the 
packaging software supports Python 2.7.
+
+https://pypi.org/project/avro-python3/
+"""
+
+
 import os
 import shutil
+import stat
 import sys
 
 from setuptools import setup
 
-
 VERSION_FILE_NAME = 'VERSION.txt'
 LICENSE_FILE_NAME = 'LICENSE'
 NOTICE_FILE_NAME = 'NOTICE'
 
-# The following prevents distutils from using hardlinks (which may not always 
be
-# available, e.g. on a Docker volume). See http://bugs.python.org/issue8876
-del os.link
-
 def RunsFromSourceDist():
   """Tests whether setup.py is invoked from a source distribution.
 
@@ -92,12 +97,6 @@ def SetupSources():
       dst=os.path.join(py3_dir, 'avro', 'tests', 'interop.avsc'),
   )
 
-  # Make sure the avro shell script is executable:
-  os.chmod(
-      path=os.path.join(py3_dir, 'scripts', 'avro'),
-      mode=0o777,
-  )
-
 
 def ReadVersion():
   """Returns: the content of the Avro version file."""
@@ -110,9 +109,6 @@ def ReadVersion():
 
 
 def Main():
-  assert (sys.version_info[0] >= 3), \
-      ('Python version >= 3 required, got %r' % sys.version_info)
-
   if not RunsFromSourceDist():
     SetupSources()
 
@@ -145,6 +141,16 @@ def Main():
       license = 'Apache License 2.0',
       keywords = 'avro serialization rpc',
       url = 'http://avro.apache.org/',
+      classifiers=(
+          'License :: OSI Approved :: Apache Software License',
+          'Programming Language :: Python :: 3 :: Only',
+          'Programming Language :: Python :: 3.4',
+          'Programming Language :: Python :: 3.5',
+          'Programming Language :: Python :: 3.6',
+          'Programming Language :: Python :: 3.7',
+          'Programming Language :: Python :: 3.8',
+      ),
+      python_requires='>=3.4',
   )
 
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> egg_info fails for avro-python3 using python2
> ---------------------------------------------
>
>                 Key: AVRO-2240
>                 URL: https://issues.apache.org/jira/browse/AVRO-2240
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: python
>    Affects Versions: 1.8.2
>            Reporter: Luke Zulauf
>            Assignee: Michael A. Smith
>            Priority: Major
>             Fix For: 1.9.0
>
>
> When managing dependencies, the ability to call egg_info on any package is 
> especially useful (even if the package is not valid for installation with a 
> specific python version).
> For example, pipenv can't build a lockfile in python2 if avro-python3 is 
> listed as a dependency (for any python version)
>  
> The opposite works (using python3 to check the egg_info of avro (the python2 
> version).
>  
> {code:java}
> $ python3 avro/setup.py egg_info
> (succeeds)
> $ python2 avro/setup.py egg_info
> (succeeds)
> $ python3 avro-python3/setup.py egg_info
> (succeeds)
> $ python2 avro-python3/setup.py egg_info
> (fails){code}
> It would be great if you didn't raise an assertion error for all usages of 
> running setup.py, especially when running egg_info.



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

Reply via email to