Skip to content

Commit f9810ad

Browse files
Reza Jelvehedenhill
authored andcommitted
implement environment markers to fix poetry
pep 508 recommends the usage of environment markers rather than version_info https://www.python.org/dev/peps/pep-0508/#environment-markers currently installing using poetry resolves the wrong libraries
1 parent bfb07df commit f9810ad

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

setup.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@
33
import os
44
from setuptools import setup, find_packages
55
from distutils.core import Extension
6-
import sys
76
import platform
87

9-
INSTALL_REQUIRES = list()
10-
11-
if sys.version_info[0] < 3:
12-
avro = 'avro'
13-
INSTALL_REQUIRES.extend(['futures', 'enum34', 'requests'])
14-
else:
15-
avro = 'avro-python3'
8+
INSTALL_REQUIRES = [
9+
'futures;python_version<"3.2"',
10+
'enum34;python_version<"3.4"',
11+
'requests;python_version<"3.2"'
12+
]
1613

1714
# On Un*x the library is linked as -lrdkafka,
1815
# while on windows we need the full librdkafka name.
@@ -51,6 +48,11 @@ def get_install_requirements(path):
5148
data_files=[('', ['LICENSE.txt'])],
5249
install_requires=INSTALL_REQUIRES,
5350
extras_require={
54-
'avro': ['fastavro', 'requests', avro],
51+
'avro': [
52+
'fastavro',
53+
'requests',
54+
'avro;python_version<"3.0"',
55+
'avro-python3;python_version>"3.0"'
56+
],
5557
'dev': get_install_requirements("test-requirements.txt")
5658
})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy