lra / mackup

Keep your application settings in sync (OS X/Linux)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Switch to pyproject.toml

mardybardy opened this issue · comments

I'm currently using pdm as my package manager which I installed using asdf and it is currently working like a dream. However it requires a pyproject.toml file to operate rather than a setup file. It appears setup.py is being phased out according to PIP Documentation in favour of pyproject.toml so is there any chance of switching over? I'm willing to give it a go myself but may need some support as I'm primarily a javascript/typescript developer and have only dabbled with python so not well versed with setting up the tooling.

Edit:
I believe I have made a good start here, it appears to build when I run pdm build.

I am unsure on a few things:

  • TOML files cannot import variables so I replaced the hard coded version number with setuptools_scm to dynamically determine the version from the git tags. This appears to work but the default setup is as follows:
DEFAULT_DESCRIBE = [
    "git",
    "describe",
    "--dirty",
    "--tags",
    "--long",
    "--match",
    "*[0-9]*",

I need to find a way to change it to git describe --tags --abbrev=0 which just returns the version formatted as normal e.g "0.8.36"

  • I'm not sure if the change I made in the snapcraft file to return the proper version will work or not and I'm unsure how to test it. I'll have a look at the documentation tomorrow as it is something I've never worked with before.