anki-bin: 24.06.3 -> 24.11 (#360722)
[NixPkgs.git] / pkgs / development / python-modules / pysc2 / fix-setup-for-py3.patch
blobb1a2b4e2350a9b3f5d1aa6b6b235a3b08e54817f
1 diff --git a/setup.py b/setup.py
2 index 020768f..13c2b67 100755
3 --- a/setup.py
4 +++ b/setup.py
5 @@ -17,6 +17,8 @@ from __future__ import absolute_import
6 from __future__ import division
7 from __future__ import print_function
9 +import sys
11 from setuptools import setup
13 description = """PySC2 - StarCraft II Learning Environment
14 @@ -36,6 +38,27 @@ some initial research results using the environment.
15 Read the README at https://github.com/deepmind/pysc2 for more information.
16 """
18 +requires = [
19 + 'absl-py>=0.1.0',
20 + 'future',
21 + 'mock',
22 + 'mpyq',
23 + 'numpy>=1.10',
24 + 'portpicker>=1.2.0',
25 + 'protobuf>=2.6',
26 + 'pygame',
27 + 's2clientprotocol>=3.19.0.58400.0',
28 + 'six',
29 + 'websocket-client',
32 +if sys.version_info[0] == 2:
33 + requires.append('futures')
35 +if (sys.version_info[0] == 2
36 + or (sys.version_info[0] == 3 and sys.version_info[1] < 4)):
37 + requires.append('enum34')
39 setup(
40 name='PySC2',
41 version='1.2',
42 @@ -56,21 +79,7 @@ setup(
43 'pysc2.run_configs',
44 'pysc2.tests',
46 - install_requires=[
47 - 'absl-py>=0.1.0',
48 - 'enum34',
49 - 'future',
50 - 'futures',
51 - 'mock',
52 - 'mpyq',
53 - 'numpy>=1.10',
54 - 'portpicker>=1.2.0',
55 - 'protobuf>=2.6',
56 - 'pygame',
57 - 's2clientprotocol>=3.19.0.58400.0',
58 - 'six',
59 - 'websocket-client',
60 - ],
61 + install_requires=requires,
62 entry_points={
63 'console_scripts': [
64 'pysc2_agent = pysc2.bin.agent:entry_point',