Skip to main content

Convert pyproject.toml to Gentoo ebuilds automatically.

Project description

pyproject2ebuild

pyproject2ebuild is a tool to automatically convert Python pyproject.toml metadata into Gentoo ebuild files. It can openrate on a local pyproject.toml or fetch it for you.

Features

  • Parses project name, version, description, license, homepage
  • Converts Python dependencies to Gentoo dependency syntax
  • Auto-maps version constraints
  • Auto-generate metadata.xml
  • Compatible with setuptools and setuptools_scm
  • GPL-3.0-or-later licensed

Example:

$ pyproject2ebuild https://raw.githubusercontent.com/pyupio/safety/refs/heads/main/pyproject.toml
Downloaded pyproject.toml from https://raw.githubusercontent.com/pyupio/safety/refs/heads/main/pyproject.toml
Ebuild written to ./safety-3.4.0.ebuild


$ cat safety-3.4.0.ebuild
# Copyright 2025
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_11 python3_12 )

inherit distutils-r1

DESCRIPTION="Scan dependencies for known vulnerabilities and licenses."
HOMEPAGE=""
SRC_URI="https://pypi.io/packages/source/s/safety/safety-3.4.0.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"

DEPEND="
	>=dev-python/authlib-1.2.0[${PYTHON_USEDEP}]
	>=dev-python/click-8.0.2[${PYTHON_USEDEP}]
	>=dev-python/dparse-0.6.4[${PYTHON_USEDEP}]
	>=dev-python/filelock-3.16.1[${PYTHON_USEDEP}]
	>=dev-python/jinja2-3.1.0[${PYTHON_USEDEP}]
	>=dev-python/marshmallow-3.15.0[${PYTHON_USEDEP}]
	>=dev-python/packaging-21.0[${PYTHON_USEDEP}]
	>=dev-python/psutil-6.1.0[${PYTHON_USEDEP}]
	>=dev-python/pydantic-2.6.0[${PYTHON_USEDEP}]
	<dev-python/pydantic-2.10.0[${PYTHON_USEDEP}]
	dev-python/requests[${PYTHON_USEDEP}]
	dev-python/httpx[${PYTHON_USEDEP}]
	dev-python/tenacity[${PYTHON_USEDEP}]
	=dev-python/safety-schemas-0.0.14[${PYTHON_USEDEP}]
	>=dev-python/setuptools-65.5.1[${PYTHON_USEDEP}]
	>=dev-python/typer-0.12.1[${PYTHON_USEDEP}]
	>=dev-python/typing-extensions-4.7.1[${PYTHON_USEDEP}]
	>=dev-python/nltk-3.9[${PYTHON_USEDEP}]
	dev-python/tomlkit[${PYTHON_USEDEP}]
"
RDEPEND="${DEPEND}"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyproject2ebuild-0.0.2.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyproject2ebuild-0.0.2-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file pyproject2ebuild-0.0.2.tar.gz.

File metadata

  • Download URL: pyproject2ebuild-0.0.2.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for pyproject2ebuild-0.0.2.tar.gz
Algorithm Hash digest
SHA256 94df5cd3f1ca704615779770b17bbf76cc7577e9d97d134949a1e6141e0f4ff3
MD5 d9eef34edbef4e50775cf95a48623188
BLAKE2b-256 668dba18ce4efcd1c1d63c1590cedd696cec5e01c5f9bcc889c7bb5bc69fad8b

See more details on using hashes here.

File details

Details for the file pyproject2ebuild-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pyproject2ebuild-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b9d6e1aa269982f511c8764056c5a2ba130f35a87c2d3aeb23241bd7168b528c
MD5 3b268c1b041fd68f52b9bde76c1cf187
BLAKE2b-256 334de3fb301f9c9878daf965923fd0bd5390570fe634049eda409449172a5c31

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page