2019-10-25 00:02:23 +03:00
|
|
|
import os
|
|
|
|
import sys
|
2019-12-15 01:56:46 +03:00
|
|
|
from setuptools import setup, find_packages
|
2019-10-25 00:02:23 +03:00
|
|
|
from setuptools.command.install import install
|
2019-12-15 01:56:46 +03:00
|
|
|
import mlagents_envs
|
2019-10-25 00:02:23 +03:00
|
|
|
|
2019-12-15 01:56:46 +03:00
|
|
|
VERSION = mlagents_envs.__version__
|
2020-04-27 23:35:19 +03:00
|
|
|
EXPECTED_TAG = mlagents_envs.__release_tag__
|
2019-10-25 00:02:23 +03:00
|
|
|
|
|
|
|
here = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
|
|
|
|
|
|
|
|
class VerifyVersionCommand(install):
|
|
|
|
"""
|
2020-04-27 23:35:19 +03:00
|
|
|
Custom command to verify that the git tag is the expected one for the release.
|
2020-10-06 01:25:00 +03:00
|
|
|
Originally based on https://circleci.com/blog/continuously-deploying-python-packages-to-pypi-with-circleci/
|
2020-04-27 23:35:19 +03:00
|
|
|
This differs slightly because our tags and versions are different.
|
2019-10-25 00:02:23 +03:00
|
|
|
"""
|
|
|
|
|
|
|
|
description = "verify that the git tag matches our version"
|
|
|
|
|
|
|
|
def run(self):
|
2020-10-06 01:25:00 +03:00
|
|
|
tag = os.getenv("GITHUB_REF", "NO GITHUB TAG!").replace("refs/tags/", "")
|
2019-10-25 00:02:23 +03:00
|
|
|
|
2020-04-27 23:35:19 +03:00
|
|
|
if tag != EXPECTED_TAG:
|
2020-07-17 04:00:56 +03:00
|
|
|
info = "Git tag: {} does not match the expected tag of this app: {}".format(
|
2020-04-27 23:35:19 +03:00
|
|
|
tag, EXPECTED_TAG
|
2019-10-25 00:02:23 +03:00
|
|
|
)
|
|
|
|
sys.exit(info)
|
2019-04-01 21:48:29 +03:00
|
|
|
|
|
|
|
|
|
|
|
setup(
|
2019-04-13 00:23:30 +03:00
|
|
|
name="mlagents_envs",
|
2019-10-25 00:02:23 +03:00
|
|
|
version=VERSION,
|
2019-04-13 00:23:30 +03:00
|
|
|
description="Unity Machine Learning Agents Interface",
|
|
|
|
url="https://github.com/Unity-Technologies/ml-agents",
|
|
|
|
author="Unity Technologies",
|
|
|
|
author_email="ML-Agents@unity3d.com",
|
2019-04-01 21:48:29 +03:00
|
|
|
classifiers=[
|
2019-04-13 00:23:30 +03:00
|
|
|
"Intended Audience :: Developers",
|
|
|
|
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
|
|
"License :: OSI Approved :: Apache Software License",
|
2020-12-21 21:47:21 +03:00
|
|
|
"Programming Language :: Python :: 3.8",
|
2022-10-19 04:27:43 +03:00
|
|
|
"Programming Language :: Python :: 3.9",
|
|
|
|
"Programming Language :: Python :: 3.10",
|
2019-04-01 21:48:29 +03:00
|
|
|
],
|
2022-02-03 03:32:23 +03:00
|
|
|
packages=find_packages(
|
|
|
|
exclude=["*.tests", "*.tests.*", "tests.*", "tests", "colabs", "*.ipynb"]
|
|
|
|
),
|
2019-04-01 21:48:29 +03:00
|
|
|
zip_safe=False,
|
|
|
|
install_requires=[
|
2019-07-18 00:35:17 +03:00
|
|
|
"cloudpickle",
|
2019-09-17 02:11:21 +03:00
|
|
|
"grpcio>=1.11.0",
|
2020-12-04 20:47:17 +03:00
|
|
|
"numpy>=1.14.1",
|
2019-09-17 02:11:21 +03:00
|
|
|
"Pillow>=4.2.1",
|
|
|
|
"protobuf>=3.6",
|
2020-05-21 20:01:27 +03:00
|
|
|
"pyyaml>=3.1.0",
|
2022-02-16 22:42:22 +03:00
|
|
|
"gym>=0.21.0",
|
2022-05-05 19:33:30 +03:00
|
|
|
"pettingzoo==1.15.0",
|
2022-02-03 03:32:23 +03:00
|
|
|
"numpy==1.21.2",
|
2022-02-10 00:43:17 +03:00
|
|
|
"filelock>=3.4.0",
|
2019-04-13 00:23:30 +03:00
|
|
|
],
|
2022-10-19 04:27:43 +03:00
|
|
|
python_requires=">=3.8.13,<=3.10.8",
|
2022-02-08 05:18:16 +03:00
|
|
|
# TODO: Remove this once mypy stops having spurious setuptools issues.
|
|
|
|
cmdclass={"verify": VerifyVersionCommand}, # type: ignore
|
2019-04-01 21:48:29 +03:00
|
|
|
)
|