Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jan 2022 22:29:57 -0500
From:      Yoshihiro Ota <ota@j.email.ne.jp>
To:        Teran McKinney <sega01@go-beyond.org>
Cc:        ota@j.email.ne.jp, freebsd-ports@freebsd.org
Subject:   Re: Adding support for py-package w/ setup.cfg but w/o setup.py
Message-ID:  <20220104222957.6901cace538fbd05750c5512@j.email.ne.jp>
In-Reply-To: <YdT7Kt0YYDmV7mdU@daemon>
References:  <20220104194633.e087cd0f7dd8be67eae5c589@j.email.ne.jp> <YdT7Kt0YYDmV7mdU@daemon>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 5 Jan 2022 01:58:02 +0000
Teran McKinney <sega01@go-beyond.org> wrote:

> On 2022-01-04 19-46-33    , Yoshihiro Ota wrote:
> > Hi,
> > 
> > I recently create a new PyPI tool for FreeBSD.
> > Based on PyPI's instruction, I have setup.cfg only without setup.py.
> > https://packaging.python.org/en/latest/tutorials/packaging-projects/ suggests go with setup.cfg
> > only for simplicity.
> > 
> > I'm now trying to make a port for it.
> > However, FreeBSD ports expects a setup.py file.
> > 
> > It looks if we can run "from setuptools import setup; setup()" in Mk/Uses/python.mk if PYSETUP
> > file doesn't exit.
> > 
> > I'm wondering if some FreeBSD python port expert can consider no PYSETUP file configuration.
> > 
> > Hiro
> 
> Hi Hiro,
> 
> For packages without a setup.py, in many cases there may be a
> pyproject.toml with PEP-518 support. Some of these use setuptools
> still, others may use Poetry, flit, etc.
> 
> For these, build should usually be used. python3.9 -m build, etc.
> 
> As far as how this plays out with ports, I'm not sure exactly, but
> wanted to put my two cents out there.
> 
> -Teran
> 


Hi Teran,

That's interesting.
There is a section about pyproject.toml, https://packaging.python.org/en/latest/tutorials/packaging-projects/#creating-pyproject-toml.

Indeed, I had run 'python3  -m build' to create a PyPI package following the steps.

So, that's a different way to build from 'distutils', isn't it?

Some dots started connecting, at last.

Hiro



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220104222957.6901cace538fbd05750c5512>