use poetry to build openpype wheel

This commit is contained in:
Ondrej Samohel 2021-06-03 16:02:59 +02:00 committed by Ondrej Samohel
parent 5bc34f18da
commit 630722a524
No known key found for this signature in database
GPG key ID: 02376E18990A97C6
3 changed files with 33 additions and 5 deletions

View file

@ -9,6 +9,23 @@ documentation = "https://openpype.io/docs/artist_getting_started"
repository = "https://github.com/pypeclub/openpype"
readme = "README.md"
keywords = ["Pipeline", "Avalon", "VFX", "animation", "automation", "tracking", "asset management"]
packages = [
{include = "igniter"},
{include = "repos"},
{include = "tools"},
{include = "tests"},
{include = "docs"},
{include = "openpype"},
{include = "start.py"},
{include = "LICENSE"},
{include = "README.md"},
{include = "setup.py"},
{include = "pyproject.toml"},
{include = "poetry.lock"}
]
[tool.poetry.scripts]
openpype = 'start:boot'
[tool.poetry.dependencies]
python = "3.7.*"
@ -66,6 +83,7 @@ sphinx-qt-documentation = "*"
recommonmark = "*"
wheel = "*"
enlighten = "*" # cool terminal progress bars
aenum = "^3.1.0" # cross-python compatible Enum, used in representations
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/pypeclub/openpype/issues"

View file

@ -50,7 +50,9 @@ install_requires = [
]
includes = []
excludes = []
excludes = [
"openpype"
]
bin_includes = []
include_files = [
"igniter",

View file

@ -120,7 +120,7 @@ _print("Copying dependencies ...")
total_files = count_folders(site_pkg)
progress_bar = enlighten.Counter(
total=total_files, desc="Processing Dependencies",
units="%", color="green")
units="%", color=(53, 178, 202))
def _progress(_base, _names):
@ -140,7 +140,8 @@ to_delete = []
deps_items = list(deps_dir.iterdir())
item_count = len(list(libs_dir.iterdir()))
find_progress_bar = enlighten.Counter(
total=item_count, desc="Finding duplicates", units="%", color="yellow")
total=item_count, desc="Finding duplicates", units="%",
color=(56, 211, 159))
for d in libs_dir.iterdir():
if (deps_dir / d.name) in deps_items:
@ -152,16 +153,23 @@ find_progress_bar.close()
# add openpype and igniter in libs too
to_delete.append(libs_dir / "openpype")
to_delete.append(libs_dir / "igniter")
to_delete.append(libs_dir / "openpype.pth")
to_delete.append(deps_dir / "openpype.pth")
# delete duplicates
# _print(f"Deleting {len(to_delete)} duplicates ...")
delete_progress_bar = enlighten.Counter(
total=len(to_delete), desc="Deleting duplicates", units="%", color="red")
total=len(to_delete), desc="Deleting duplicates", units="%",
color=(251, 192, 32))
for d in to_delete:
if d.is_dir():
shutil.rmtree(d)
else:
d.unlink()
try:
d.unlink()
except FileNotFoundError:
# skip non-existent silently
pass
delete_progress_bar.update()
delete_progress_bar.close()