Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize packaging system #79

Open
derekbarbosa opened this issue Feb 19, 2024 · 1 comment
Open

Standardize packaging system #79

derekbarbosa opened this issue Feb 19, 2024 · 1 comment

Comments

@derekbarbosa
Copy link

Hi there,

Not sure if this is stale or not (given the two open issues that haven't had any resolution) but I came across project looking for some sort of static simple HTML generation from some scripts I have been using for a while now.

Anyway, I noticed that this project still uses the setup.py method of installation. In fact, doing a pip install yattag from within my venv prompts the following message:

DEPRECATION: yattag is being installed using the legacy 'setup.py install' method, 
because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. 

Pip 23.1 will enforce this behaviour change. 

A possible replacement is to enable the '--use-pep517' option. 

Discussion can be found at https://github.com/pypa/pip/issues/8559

While setup.py is not fully deprecated for the time being (the installation still ran successfully) , I propose that converting the current setup.py project structure to include a pyproject.toml (as demonstrated by this guide).

This will also allow for installation locally using pip install .

A quick-and-dirty example could be as follows (please validate prior to copy-pasting using the linked docs):

[build-system] # backend build system
requires = ["setuptools"] 
build-backend = "setuptools.build_meta"

[project] # metadata
name = "yattag"
authors = [
    {name = "Benjamin Le Forestier", email = "benjamin@leforestier.org"},
]
license = {text = "LGPL-2.1"}
version = "1.15.2"
readme = "README.rst"
requires-python = ">=3.5"
dependencies = [
    "typing",
]
urls = { Project-URL = Website, https://www.yattag.org }
description  = "Generate HTML or XML in a pythonic way. Pure python alternative to web template engines & can fill HTML forms with default values and error messages."
keywords = [
    "html", 
    "template", 
    "templating", 
    "xml", 
    "document", 
    "form", 
    "rendering",
]

[project.scripts] # the entry point

If you have any other alternatives for a simple HTML generator such as this (if the project is deemed stale and no longer in development) please let me know and close the issue.

@leforestier
Copy link
Owner

leforestier commented Feb 28, 2024

Hello Derek,

thanks for bringing up that issue.

I didn't know that the setup.py method for installation was getting deprecated.

The project is not stale but I don't have much time to put into it at the moment. If you want to add a pyproject.toml to the project, I will happily review a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants