Update packaging.

This commit is contained in:
2023-10-15 05:00:29 +00:00
parent 9dce1e843f
commit 0134bd1262
4 changed files with 42 additions and 31 deletions
+2
View File
@@ -2,3 +2,5 @@
!.gitignore
__pycache__/
*.egg-info/
/cista/_version.py
/dist
+2 -5
View File
@@ -3,13 +3,10 @@
Development install:
```sh
python -m venv .venv # Create virtual env
. .venv/bin/activate
pip install -e . # Editable install
sanic cista --reload --dev # Runs on localhost:8000
pip install hatch --break-system-packages
hatch run sanic cista --reload --dev # Runs on localhost:8000
```
Environment variable `STORAGE=<path>` may be used to choose which folder it serves. The default is current directory.
No authentication is supported, so implement access control externally or be careful with your files.
+38
View File
@@ -0,0 +1,38 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "cista"
dynamic = ["version"]
description = "Dropbox-like file server with modern web interface"
readme = "README.md"
license = ""
authors = [
{ name = "Vasanko lda" },
]
classifiers = [
]
dependencies = [
"msgspec",
"pathvalidate",
"sanic",
"watchdog",
]
[project.urls]
Homepage = ""
[tool.hatch]
version.source = "vcs"
[tool.hatch.build]
hooks.vcs.version-file = "cista/_version.py"
hooks.vcs.template = """
# This file is automatically generated by hatch build.
version = {version!r}
version_tuple = {version_tuple!r}
"""
targets.sdist.include = [
"/cista",
]
-26
View File
@@ -1,26 +0,0 @@
# Install package
import setuptools
import pathlib
doc = pathlib.Path(__file__).parent.joinpath('README.md').read_text(encoding="UTF-8")
setuptools.setup(
name="cista",
version="0.0.1",
author="Vasanko lda",
description="Dropbox-like file server with modern web interface",
long_description=doc,
long_description_content_type="text/markdown",
url="",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
],
install_requires=[
"sanic",
"msgspec",
"watchdog",
"pathvalidate",
],
)