setuptools was straight forward and now it has disappeared...

Hey There…I am building libs as a good, ole hobby for now…

I see setuptools has been deprecated and everything I was learning is now ambushed into deprecation. Blah…

Anyway, I am not using a .toml file for installing an installation and/or lib. in python3. Setuptools used to be so straight forward and easy to manage with additions and so on.

I am stuck. I have two files. PEP 517 is already deprecated and still around since other source relies on it and the PEP 517.hook_callers.

So, dang it man/ladies. I have one file calling pyproject.toml called li.py. That file called li.py is simple and right from the PEP 517 page online (if you follow Python3 jargon).

So, anyway, here is the main gist of it:

import os
import tomli
from pep517.wrappers import Pep517HookCaller

src = '/home/gort/Saber/'  # Folder containing 'pyproject.toml'
with open(os.path.join(src, 'pyproject.toml'), 'rb') as f:
    build_sys = tomli.load(f)['build-system']

print(build_sys['requires'])  # List of static requirements
# The caller is responsible for installing these and running the hooks in
# an environment where they are available.

hooks = Pep517HookCaller(
    src,
    build_backend=build_sys['build-backend'],
    backend_path=build_sys.get('backend-path'),
)

config_options = {}   # Optional parameters for backend
# List of dynamic requirements:
print(hooks.get_requires_for_build_wheel(config_options))
# Again, the caller is responsible for installing these build requirements

destination = '/home/gort/Saber/'
whl_filename = hooks.build_wheel(destination, config_options)
assert os.path.isfile(os.path.join(destination, whl_filename))

While the Saber folder/dir/file resides where I state in the file, I am receiving a very odd answer as output:

tomli.TOMLDecodeError: Unclosed array (at line 25, column 31)

It is from a _parser.py file from tomli with python3.11.

Seth

P.S. If you understand the way libs. in python3 should be made these days, please continue supporting the cause and maybe help me in the process. I will keep researching ideas and see how far I get… (Dead Ends)! I am not going to rewrite Python3 and PEP 517 with /tomli/_parser.py.

I Think

This may be the error: build_sys = tomli.load(f)['build-system']

But…I cannot solve it (YET).

In case this is off subject for beagleboard.org, I have stopped in to the StackOverflow site online and started a staging area thread.

Please see here: https://stackoverflow.com/staging-ground/79174656

Seth

I stopped using [hatch] as my build and backend. I used pip instead and everything seems to work now. Hmm…

Anyway, thank you for reading my plea here!

Seth