Merge pull request #57 from rubenjacob/fix_missing_package_data
Fix package data to include all xml and stl files
This commit is contained in:
commit
3de774b7d4
16
setup.py
16
setup.py
@ -1,4 +1,6 @@
|
||||
import itertools
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
@ -15,6 +17,16 @@ extras = {
|
||||
all_groups = set(extras.keys())
|
||||
extras["all"] = list(set(itertools.chain.from_iterable(map(lambda group: extras[group], all_groups))))
|
||||
|
||||
|
||||
def find_package_data(extensions_to_include: List[str]) -> List[str]:
|
||||
envs_dir = Path("fancy_gym/envs/mujoco")
|
||||
package_data_paths = []
|
||||
for extension in extensions_to_include:
|
||||
package_data_paths.extend([str(path)[10:] for path in envs_dir.rglob(extension)])
|
||||
|
||||
return package_data_paths
|
||||
|
||||
|
||||
setup(
|
||||
author='Fabian Otto, Onur Celik',
|
||||
name='fancy_gym',
|
||||
@ -39,9 +51,7 @@ setup(
|
||||
],
|
||||
packages=[package for package in find_packages() if package.startswith("fancy_gym")],
|
||||
package_data={
|
||||
"fancy_gym": [
|
||||
"envs/mujoco/*/assets/*.xml",
|
||||
]
|
||||
"fancy_gym": find_package_data(extensions_to_include=["*.stl", "*.xml"])
|
||||
},
|
||||
python_requires=">=3.7",
|
||||
url='https://github.com/ALRhub/fancy_gym/',
|
||||
|
Loading…
Reference in New Issue
Block a user