avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fo...@apache.org
Subject [avro] branch master updated: AVRO-2240 Fix py3 Setup (#347)
Date Wed, 07 Nov 2018 22:15:31 GMT
This is an automated email from the ASF dual-hosted git repository.

fokko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/master by this push:
     new 6527d6d  AVRO-2240 Fix py3 Setup (#347)
6527d6d is described below

commit 6527d6d1d5081d38168b9ea14bd7d715c5e2af8d
Author: Michael A. Smith <michael@smith-li.com>
AuthorDate: Wed Nov 7 17:15:27 2018 -0500

    AVRO-2240 Fix py3 Setup (#347)
    
    * AVRO-2240 Make setup.py python2 compatible
    
    Indicate that avro-python3 is only python3 compatible without making the
    setup script itself incompatible with python 2.
    
    Fix a bug with chmod in setup.py
    
    Add trove classifiers to setup.py
    
    * Specify Python 3.4 and Up
    
    Lazy Consensus per the utter silence of https://mail-archives.apache.org/mod_mbox/avro-dev/201810.mbox/%3CCA%2BB44%2BC0MLQreV2tozd8GFv74qnyBT0%2B3rd44Ey29Gv4T_9%2B3Q%40mail.gmail.com%3E.
    
    * AVRO-2240 Remove Junk
---
 lang/py3/setup.py | 36 +++++++++++++++++++++---------------
 1 file changed, 21 insertions(+), 15 deletions(-)

diff --git a/lang/py3/setup.py b/lang/py3/setup.py
index 38f7117..c96e08f 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',
   )
 
 


Mime
View raw message