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:
parent
345350f2ce
commit
94aeeba88d
33
pyproject.toml
Normal file
33
pyproject.toml
Normal 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"]
|
30
setup.py
30
setup.py
@ -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",
|
|
||||||
)
|
|
1
src/liteshort/__init__.py
Normal file
1
src/liteshort/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from .liteshort import app
|
@ -356,7 +356,3 @@ def main_post():
|
|||||||
return response(request, get_baseUrl() + short, "Error: Failed to generate")
|
return response(request, get_baseUrl() + short, "Error: Failed to generate")
|
||||||
else:
|
else:
|
||||||
return response(request, None, "Long URL required")
|
return response(request, None, "Long URL required")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
app.run()
|
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Loading…
Reference in New Issue
Block a user