Merge pull request #1636 from pypeclub/feature/pypi-wheels-by-poetry

This commit is contained in:
Milan Kolar 2021-06-03 17:02:12 +02:00 committed by GitHub
commit 77954e1635
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 33 additions and 5 deletions

1
.gitignore vendored
View file

@ -36,6 +36,7 @@ Temporary Items
# CX_Freeze
###########
/build
/dist/
/vendor/bin/*
/.venv

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.*"

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()