add pyproject.toml and start converting to poetry

need more work on dependencies
This commit is contained in:
Ondřej Samohel 2021-02-01 15:11:43 +01:00
parent 1e6f699a03
commit 1f443ccc4f
No known key found for this signature in database
GPG key ID: 02376E18990A97C6
2 changed files with 48 additions and 0 deletions

31
pyproject.toml Normal file
View file

@ -0,0 +1,31 @@
[tool.poetry]
name = "Pype"
version = "3.0.0"
description = "Multi-platform open-source pipeline built around the Avalon platform, expanding it with extra features and integrations."
authors = ["Pype Club <info@pype.club>"]
license = "MIT License"
[tool.poetry.dependencies]
python = "3.7"
acre = { git = "https://github.com/pypeclub/acre.git" }
opentimelineio = { git = "https://github.com/pypeclub/OpenTimelineIO.git", branch="develop" }
appdirs = "^1.4.3"
arrow = "^0.15.5"
certifi = "*"
clique = "1.5.*"
Click = "^7"
[tool.poetry.dev-dependencies]
flake8 = "^3.7"
autopep8 = "^1.4"
cx_freeze = "^6.1"
jedi = "^0.13"
Jinja2 = "^2.11"
pycodestyle = "^2.5.0"
pydocstyle = "^3.0.0"
pylint = "^2.4.4"
pytest = "^5.3.2"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

View file

@ -32,6 +32,15 @@ function Show-PSWarning() {
Exit-WithCode 1
}
}
function Install-Poetry() {
Write-Host ">>> " -NoNewline -ForegroundColor Green
Write-Host "Installing Poetry ... "
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python -
}
$current_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$pype_root = (Get-Item $current_dir).parent.FullName
@ -87,6 +96,14 @@ if(($matches[1] -lt 3) -or ($matches[2] -lt 7)) {
}
Write-Host "OK [ $p ]" -ForegroundColor green
Write-Host ">>> " -NoNewline -ForegroundColor Green
Write-Host "Reading Poetry ... " -NoNewline
if (-not (Test-Path -PathType Container -Path "$($env:USERPROFILE)\poetry\bin")) {
Write-Host "NOT FOUND" -ForegroundColor Yellow
Install-Poetry
}
# Create venv directory if not exist
if (-not (Test-Path -PathType Container -Path "$($pype_root)\venv")) {
New-Item -ItemType Directory -Force -Path "$($pype_root)\venv"