Update packaging.

This commit is contained in:
Leo Vasanko 2023-10-15 11:00:29 +03:00 committed by Leo Vasanko
parent 46cfc831ff
commit 27b89d6d38
4 changed files with 42 additions and 31 deletions

2
.gitignore vendored
View File

@ -2,3 +2,5 @@
!.gitignore !.gitignore
__pycache__/ __pycache__/
*.egg-info/ *.egg-info/
/cista/_version.py
/dist

View File

@ -3,13 +3,10 @@
Development install: Development install:
```sh ```sh
python -m venv .venv # Create virtual env pip install hatch --break-system-packages
. .venv/bin/activate hatch run sanic cista --reload --dev # Runs on localhost:8000
pip install -e . # Editable install
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. 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. No authentication is supported, so implement access control externally or be careful with your files.

38
pyproject.toml Normal file
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",
]

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",
],
)