Remove Python 3.5 support, travis and setup.py maintenance (#2084)

* remove python 3.5, update travis

* add travis

* add cmake during tests

* add swig

* disable python 3.8 removal?

* remove depricated failover

* add opencv and pillow minimum versions

* try removing pillow minimum version

* try older version of ubuntu

* reup ubuntu

* make pillow version suitable for pyglet version range

* remove extraneous run

* rerun stalled CI
This commit is contained in:
Justin Terry
2020-11-06 20:04:23 -05:00
committed by GitHub
parent eee9b28882
commit eec7d3354a
4 changed files with 10 additions and 16 deletions

View File

@@ -1,15 +1,13 @@
dist: xenial dist: focal
language: python language: python
python: python:
- "3.7" - "3.7"
services: services:
- docker - docker
env: env:
- PY_VER=3.5.6 - PY_VER=3.6.12
- PY_VER=3.6.8 - PY_VER=3.7.9
- PY_VER=3.7.3 - PY_VER=3.8.6
- PY_VER=3.8.1
install: "" # so travis doesn't do pip install requirements.txt install: "" # so travis doesn't do pip install requirements.txt
script: script:
@@ -22,4 +20,4 @@ deploy:
password: $TWINE_PASSWORD password: $TWINE_PASSWORD
on: on:
tags: true tags: true
condition: $PY_VER = 3.5.6 condition: $PY_VER = 3.6.12

View File

@@ -300,10 +300,7 @@ class ImageEncoder(object):
if frame.dtype != np.uint8: if frame.dtype != np.uint8:
raise error.InvalidFrame("Your frame has data type {}, but we require uint8 (i.e. RGB values from 0-255).".format(frame.dtype)) raise error.InvalidFrame("Your frame has data type {}, but we require uint8 (i.e. RGB values from 0-255).".format(frame.dtype))
if distutils.version.LooseVersion(np.__version__) >= distutils.version.LooseVersion('1.9.0'):
self.proc.stdin.write(frame.tobytes()) self.proc.stdin.write(frame.tobytes())
else:
self.proc.stdin.write(frame.tostring())
def close(self): def close(self):
self.proc.stdin.close() self.proc.stdin.close()

View File

@@ -1,7 +1,7 @@
# A Dockerfile that sets up a full Gym install with test dependencies # A Dockerfile that sets up a full Gym install with test dependencies
ARG PYTHON_VER ARG PYTHON_VER
FROM python:$PYTHON_VER FROM python:$PYTHON_VER
RUN apt-get -y update && apt-get install -y unzip libglu1-mesa-dev libgl1-mesa-dev libosmesa6-dev xvfb patchelf ffmpeg RUN apt-get -y update && apt-get install -y unzip libglu1-mesa-dev libgl1-mesa-dev libosmesa6-dev xvfb patchelf ffmpeg cmake swig
RUN \ RUN \
# Download mujoco # Download mujoco
mkdir /root/.mujoco && \ mkdir /root/.mujoco && \
@@ -19,7 +19,7 @@ RUN pip install pytest pytest-forked lz4
COPY . /usr/local/gym/ COPY . /usr/local/gym/
WORKDIR /usr/local/gym/ WORKDIR /usr/local/gym/
RUN [ "$PYTHON_VER" != "3.8.1" ] && pip install .[all] || pip install . RUN pip install .[all]
ENTRYPOINT ["/usr/local/gym/bin/docker_entrypoint"] ENTRYPOINT ["/usr/local/gym/bin/docker_entrypoint"]
CMD ["pytest","--forked"] CMD ["pytest","--forked"]

View File

@@ -7,7 +7,7 @@ from version import VERSION
# Environment-specific dependencies. # Environment-specific dependencies.
extras = { extras = {
'atari': ['atari_py~=0.2.0', 'Pillow', 'opencv-python'], 'atari': ['atari_py~=0.2.0', 'opencv-python>=3.'],
'box2d': ['box2d-py~=2.3.5'], 'box2d': ['box2d-py~=2.3.5'],
'classic_control': [], 'classic_control': [],
'mujoco': ['mujoco_py>=1.50, <2.0', 'imageio'], 'mujoco': ['mujoco_py>=1.50, <2.0', 'imageio'],
@@ -28,7 +28,7 @@ setup(name='gym',
if package.startswith('gym')], if package.startswith('gym')],
zip_safe=False, zip_safe=False,
install_requires=[ install_requires=[
'scipy', 'numpy>=1.10.4', 'pyglet>=1.4.0,<=1.5.0', 'cloudpickle>=1.2.0,<1.7.0', 'scipy', 'numpy>=1.10.4', 'pyglet>=1.4.0,<=1.5.0', 'Pillow<=7.2.0', 'cloudpickle>=1.2.0,<1.7.0',
], ],
extras_require=extras, extras_require=extras,
package_data={'gym': [ package_data={'gym': [
@@ -42,10 +42,9 @@ setup(name='gym',
'envs/robotics/assets/textures/*.png'] 'envs/robotics/assets/textures/*.png']
}, },
tests_require=['pytest', 'mock'], tests_require=['pytest', 'mock'],
python_requires='>=3.5', python_requires='>=3.6',
classifiers=[ classifiers=[
'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.8',