Migrate to pyproject.toml.
PiperOrigin-RevId: 572726851 Change-Id: Iad254df70d15c962a5e58c8caf82b32530d26b06
This commit is contained in:
committed by
Copybara-Service
parent
f32219c37c
commit
649a474788
+1
-2
@@ -1,4 +1,3 @@
|
|||||||
include LICENSE *.md
|
include LICENSE *.md
|
||||||
recursive-include mujoco *.h *.cc *.mm CMakeLists.txt Simulate*.cmake
|
recursive-include mujoco *.h *.cc *.mm CMakeLists.txt *.cmake
|
||||||
recursive-include cmake *.cmake
|
|
||||||
recursive-include mujoco/mjpython mjpython.* Info.plist
|
recursive-include mujoco/mjpython mjpython.* Info.plist
|
||||||
|
|||||||
@@ -50,13 +50,13 @@ export PYTHONPATH="${old_pythonpath}"
|
|||||||
cp "${package_dir}"/../LICENSE .
|
cp "${package_dir}"/../LICENSE .
|
||||||
|
|
||||||
# Copy over CMake scripts.
|
# Copy over CMake scripts.
|
||||||
mkdir cmake
|
mkdir mujoco/cmake
|
||||||
cp "${package_dir}"/../cmake/*.cmake cmake
|
cp "${package_dir}"/../cmake/*.cmake mujoco/cmake
|
||||||
|
|
||||||
# Copy over Simulate source code.
|
# Copy over Simulate source code.
|
||||||
cp -r "${package_dir}"/../simulate mujoco
|
cp -r "${package_dir}"/../simulate mujoco
|
||||||
|
|
||||||
python setup.py sdist --formats=gztar
|
python -m build . --sdist
|
||||||
tar -tf dist/mujoco-*.tar.gz
|
tar -tf dist/mujoco-*.tar.gz
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,22 @@
|
|||||||
absl-py==2.0.0 \
|
absl-py==2.0.0 \
|
||||||
--hash=sha256:9a28abb62774ae4e8edbe2dd4c49ffcd45a6a848952a5eccc6a49f3f0fc1e2f3
|
--hash=sha256:9a28abb62774ae4e8edbe2dd4c49ffcd45a6a848952a5eccc6a49f3f0fc1e2f3
|
||||||
|
build==1.0.3 \
|
||||||
|
--hash=sha256:589bf99a67df7c9cf07ec0ac0e5e2ea5d4b37ac63301c4986d1acb126aa83f8f
|
||||||
pip==23.2.1 \
|
pip==23.2.1 \
|
||||||
--hash=sha256:7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be
|
--hash=sha256:7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be
|
||||||
setuptools==68.2.2 \
|
setuptools==68.2.2 \
|
||||||
--hash=sha256:b454a35605876da60632df1a60f736524eb73cc47bbc9f3f1ef1b644de74fd2a
|
--hash=sha256:b454a35605876da60632df1a60f736524eb73cc47bbc9f3f1ef1b644de74fd2a
|
||||||
|
|
||||||
|
# Transitive dependencies of build
|
||||||
|
colorama==0.4.6; platform_system == 'Windows' \
|
||||||
|
--hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6
|
||||||
|
importlib-metadata==6.8.0; python_version < '3.10' \
|
||||||
|
--hash=sha256:3ebb78df84a805d7698245025b975d9d67053cd94c79245ba4b3eb694abe68bb
|
||||||
|
packaging==23.2 \
|
||||||
|
--hash=sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7
|
||||||
|
pyproject_hooks==1.0.0 \
|
||||||
|
--hash=sha256:283c11acd6b928d2f6a7c73fa0d01cb2bdc5f07c57a2eeb6e83d5e56b97976f8
|
||||||
|
tomli==2.0.1; python_version < '3.11' \
|
||||||
|
--hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc
|
||||||
|
zipp==3.17.0; python_version < '3.10' \
|
||||||
|
--hash=sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = ["setuptools"]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "mujoco"
|
||||||
|
version = "2.3.8"
|
||||||
|
authors = [
|
||||||
|
{name = "Google DeepMind", email = "mujoco@deepmind.com"},
|
||||||
|
]
|
||||||
|
description = "MuJoCo Physics Simulator"
|
||||||
|
requires-python = ">=3.8"
|
||||||
|
license = {text = "Apache License 2.0"}
|
||||||
|
classifiers = [
|
||||||
|
"Development Status :: 5 - Production/Stable",
|
||||||
|
"Intended Audience :: Developers",
|
||||||
|
"Intended Audience :: Science/Research",
|
||||||
|
"License :: OSI Approved :: Apache Software License",
|
||||||
|
"Natural Language :: English",
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"Programming Language :: Python :: 3.8",
|
||||||
|
"Programming Language :: Python :: 3.9",
|
||||||
|
"Programming Language :: Python :: 3.10",
|
||||||
|
"Programming Language :: Python :: 3.11",
|
||||||
|
"Programming Language :: Python :: 3.12",
|
||||||
|
"Topic :: Scientific/Engineering",
|
||||||
|
]
|
||||||
|
dependencies = [
|
||||||
|
"absl-py",
|
||||||
|
"glfw",
|
||||||
|
"numpy",
|
||||||
|
"pyopengl",
|
||||||
|
]
|
||||||
|
dynamic = ["readme", "scripts"]
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
Homepage = "https://github.com/google-deepmind/mujoco"
|
||||||
|
Documentation = "https://mujoco.readthedocs.io/en/2.3.8"
|
||||||
|
Repository = "https://github.com/google-deepmind/mujoco"
|
||||||
|
Changelog = "https://mujoco.readthedocs.io/en/2.3.8/changelog.html"
|
||||||
|
|
||||||
|
[tool.setuptools]
|
||||||
|
include-package-data = false
|
||||||
|
|
||||||
|
[tool.setuptools.packages.find]
|
||||||
|
include = ["mujoco*"]
|
||||||
|
exclude = [
|
||||||
|
"mujoco.codegen",
|
||||||
|
"mujoco.mjpython",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.setuptools.package-data]
|
||||||
|
mujoco = [
|
||||||
|
"libmujoco.*.dylib",
|
||||||
|
"libmujoco*.so.*",
|
||||||
|
"mujoco.dll",
|
||||||
|
"include/mujoco/*.h",
|
||||||
|
]
|
||||||
+6
-69
@@ -27,13 +27,9 @@ import sys
|
|||||||
import sysconfig
|
import sysconfig
|
||||||
|
|
||||||
import setuptools
|
import setuptools
|
||||||
from setuptools import find_packages
|
|
||||||
from setuptools import setup
|
|
||||||
from setuptools.command import build_ext
|
from setuptools.command import build_ext
|
||||||
from setuptools.command import install_scripts
|
from setuptools.command import install_scripts
|
||||||
|
|
||||||
__version__ = '2.3.8'
|
|
||||||
|
|
||||||
MUJOCO_CMAKE = 'MUJOCO_CMAKE'
|
MUJOCO_CMAKE = 'MUJOCO_CMAKE'
|
||||||
MUJOCO_CMAKE_ARGS = 'MUJOCO_CMAKE_ARGS'
|
MUJOCO_CMAKE_ARGS = 'MUJOCO_CMAKE_ARGS'
|
||||||
MUJOCO_PATH = 'MUJOCO_PATH'
|
MUJOCO_PATH = 'MUJOCO_PATH'
|
||||||
@@ -242,7 +238,8 @@ class BuildCMakeExtension(build_ext.build_ext):
|
|||||||
"""Check for CMake."""
|
"""Check for CMake."""
|
||||||
cmake = os.environ.get(MUJOCO_CMAKE, 'cmake')
|
cmake = os.environ.get(MUJOCO_CMAKE, 'cmake')
|
||||||
build_cfg = 'Debug' if self.debug else 'Release'
|
build_cfg = 'Debug' if self.debug else 'Release'
|
||||||
cmake_module_path = os.path.join(os.path.dirname(__file__), 'cmake')
|
cmake_module_path = os.path.join(
|
||||||
|
os.path.dirname(__file__), 'mujoco', 'cmake')
|
||||||
cmake_args = [
|
cmake_args = [
|
||||||
f'-DPython3_ROOT_DIR:PATH={sys.prefix}',
|
f'-DPython3_ROOT_DIR:PATH={sys.prefix}',
|
||||||
f'-DPython3_EXECUTABLE:STRING={sys.executable}',
|
f'-DPython3_EXECUTABLE:STRING={sys.executable}',
|
||||||
@@ -334,41 +331,9 @@ class InstallScripts(install_scripts.install_scripts):
|
|||||||
else:
|
else:
|
||||||
self.outfiles.append(oldfile)
|
self.outfiles.append(oldfile)
|
||||||
|
|
||||||
|
setuptools.setup(
|
||||||
def find_data_files(package_dir, patterns):
|
|
||||||
"""Recursively finds files whose names match the given shell patterns."""
|
|
||||||
paths = set()
|
|
||||||
for directory, _, filenames in os.walk(package_dir):
|
|
||||||
for pattern in patterns:
|
|
||||||
for filename in fnmatch.filter(filenames, pattern):
|
|
||||||
# NB: paths must be relative to the package directory.
|
|
||||||
relative_dirpath = os.path.relpath(directory, package_dir)
|
|
||||||
paths.add(os.path.join(relative_dirpath, filename))
|
|
||||||
return list(paths)
|
|
||||||
|
|
||||||
SETUP_KWARGS = dict(
|
|
||||||
name='mujoco',
|
|
||||||
version=__version__,
|
|
||||||
author='Google DeepMind',
|
|
||||||
author_email='mujoco@deepmind.com',
|
|
||||||
description='MuJoCo Physics Simulator',
|
|
||||||
long_description=get_long_description(),
|
long_description=get_long_description(),
|
||||||
long_description_content_type='text/markdown',
|
long_description_content_type='text/markdown',
|
||||||
url='https://github.com/google-deepmind/mujoco',
|
|
||||||
license='Apache License 2.0',
|
|
||||||
classifiers=[
|
|
||||||
'Development Status :: 5 - Production/Stable',
|
|
||||||
'Intended Audience :: Developers',
|
|
||||||
'Intended Audience :: Science/Research',
|
|
||||||
'License :: OSI Approved :: Apache Software License',
|
|
||||||
'Natural Language :: English',
|
|
||||||
'Programming Language :: Python :: 3',
|
|
||||||
'Programming Language :: Python :: 3.8',
|
|
||||||
'Programming Language :: Python :: 3.9',
|
|
||||||
'Programming Language :: Python :: 3.10',
|
|
||||||
'Programming Language :: Python :: 3.11',
|
|
||||||
'Topic :: Scientific/Engineering',
|
|
||||||
],
|
|
||||||
cmdclass=dict(
|
cmdclass=dict(
|
||||||
build_ext=BuildCMakeExtension,
|
build_ext=BuildCMakeExtension,
|
||||||
install_scripts=InstallScripts,
|
install_scripts=InstallScripts,
|
||||||
@@ -384,35 +349,7 @@ SETUP_KWARGS = dict(
|
|||||||
CMakeExtension('mujoco._simulate'),
|
CMakeExtension('mujoco._simulate'),
|
||||||
CMakeExtension('mujoco._structs'),
|
CMakeExtension('mujoco._structs'),
|
||||||
],
|
],
|
||||||
python_requires='>=3.8',
|
scripts=[
|
||||||
install_requires=[
|
'mujoco/mjpython/mjpython.py'
|
||||||
'absl-py',
|
] if platform.system() == 'Darwin' else [],
|
||||||
'glfw',
|
|
||||||
'numpy',
|
|
||||||
'pyopengl',
|
|
||||||
],
|
|
||||||
tests_require=[
|
|
||||||
'absl-py',
|
|
||||||
'glfw',
|
|
||||||
'numpy',
|
|
||||||
'pyopengl',
|
|
||||||
],
|
|
||||||
test_suite='mujoco',
|
|
||||||
packages=find_packages(),
|
|
||||||
package_data={
|
|
||||||
'mujoco':
|
|
||||||
find_data_files(
|
|
||||||
package_dir='mujoco',
|
|
||||||
patterns=[
|
|
||||||
'libmujoco.*.dylib',
|
|
||||||
'libmujoco*.so.*',
|
|
||||||
'mujoco.dll',
|
|
||||||
'include/mujoco/*.h',
|
|
||||||
]),
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if platform.system() == 'Darwin':
|
|
||||||
SETUP_KWARGS['scripts'] = ['mujoco/mjpython/mjpython.py']
|
|
||||||
|
|
||||||
setup(**SETUP_KWARGS)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user