My first attempt at a package.

Antoon Pardon antoon.pardon at vub.be
Mon Jul 25 04:39:46 EDT 2022



Op 19/07/2022 om 16:57 schreef David Lowry-Duda:
> On Tue, Jul 19, 2022 at 03:58:41PM +0200, Antoon Pardon wrote:
>> I am writing a python package which has the following structure
>>
>> PACKAGE
>>    * module1.py
>>    * module2.py
>>    * data.cfg
>>
>> However the data.cfg should be build at installation time.
>>
>> Can someone give advise on which packaging tool and how
>> to use it, to accomplisch this.
>
> A lot of good packaging information can be found at
>
> https://packaging.python.org/en/latest/
>
> and in particular at
>
> https://packaging.python.org/en/latest/tutorials/packaging-projects/
>
> and
>
> https://packaging.python.org/en/latest/overview/
>
> There are a couple of different ways to handle python packaging, and 
> it can be a bit confusing. But following the tutorial on packaging is 
> a good start.
>

Yes it is, but it doesn't answer my question: How do I create a package 
in which a file is built at install time.
I just want to build a configuration file that will among some other 
info contain the date the package
was installed. The idea is that you can execute python3 -m 
<package>.release to know what version
of the package you installed and when you installed it. But seem unable 
to find a way to do this.


More information about the Python-list mailing list