1
0
mirror of https://git.ikl.sh/132ikl/liteshort.git synced 2023-08-10 21:13:04 +03:00

Switch to pyproject.toml structure

This commit is contained in:
132ikl 2023-02-24 16:11:13 -05:00
parent 345350f2ce
commit 94aeeba88d
13 changed files with 34 additions and 34 deletions

View File

33
pyproject.toml Normal file
View File

@ -0,0 +1,33 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "liteshort"
version = "1.2.3"
dependencies = [
"appdirs~=1.4",
"bcrypt~=4.0",
"flask~=2.2",
"pyyaml~=6.0",
"requests~=2.28",
]
authors = [
{name = "Rose Spangler", email = "rose@ikl.sh"},
]
description = "User-friendly, actually lightweight, and configurable URL shortener"
readme = "README.md"
requires-python = ">=3.8"
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
]
license = {text = "MIT"}
[project.scripts]
liteshort = "liteshort:app.run"
lshash = "liteshort.util:hash_passwd"
[tool.setuptools.package-data]
liteshort = ["templates/*", "static/*", "config.template.yml"]

View File

@ -1,30 +0,0 @@
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="liteshort",
version="1.2.3",
author="Rose Spangler",
author_email="132@ikl.sh",
description="User-friendly, actually lightweight, and configurable URL shortener",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://git.ikl.sh/132ikl/liteshort",
packages=setuptools.find_packages(),
package_data={"liteshort": ["templates/*", "static/*", "config.template.yml"]},
entry_points={
"console_scripts": [
"liteshort = liteshort.main:app.run",
"lshash = liteshort.util:hash_passwd",
]
},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
],
install_requires=["flask~=1.1.2", "bcrypt~=3.1.7", "pyyaml", "appdirs~=1.4.3"],
python_requires=">=3.8",
)

View File

@ -0,0 +1 @@
from .liteshort import app

View File

@ -356,7 +356,3 @@ def main_post():
return response(request, get_baseUrl() + short, "Error: Failed to generate")
else:
return response(request, None, "Long URL required")
if __name__ == "__main__":
app.run()

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB