Skip to content

Update build/config to use pyproject.toml #19

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
.venv
*.pyc
*.cxml
.idea
.python-version
.DS_Store
sqlite_rx.egg-info/
cover/
build/
dist/
bin/
data/
.coverage
.pytest_cache
.coverage
Expand All @@ -15,4 +20,4 @@ start_server.py
run_client.py
curve_client.py
.pypy3venv/

.envrc
19 changes: 5 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
FROM python:3.10.5-slim as base

COPY . /sqlite_rx
FROM python:3.13-slim as base

WORKDIR /svc

RUN pip install --upgrade pip
RUN pip install Cython
RUN pip install wheel && pip wheel --wheel-dir=/svc/wheels /sqlite_rx[cli]
RUN rm -rf /sqlite_rx

COPY . /svc

FROM python:3.10.5-slim

COPY --from=base /svc /svc
WORKDIR /svc
RUN pip install --upgrade pip pipx && pipx install uv
RUN uv venv && uv sync --extra cli
RUN ln -s .venv/bin/sqlite* bin/

RUN pip install --upgrade pip
RUN pip install --no-index /svc/wheels/*.whl
38 changes: 0 additions & 38 deletions bin/curve-keygen

This file was deleted.

File renamed without changes.
12 changes: 12 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import os
import sys
current_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.join(os.path.join(current_dir, ".venv"), "bin"))
sys.path.insert(0, os.path.join(current_dir, "bin"))

def main():
print("Hello from sqlite-rx-multi!")
print(sys.path)

if __name__ == "__main__":
main()
100 changes: 98 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,99 @@
[build-system]
requires = ['setuptools >= 40.8.0', 'wheel']
build-backend = "setuptools.build_meta"
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "sqlite_rx"
version = "2.0.0-alpha"
description = "Python SQLite Client and Server"
keywords = ["sqlite", "client", "server", "fast", "secure"]
license = {text = "MIT License"}
classifiers = [
"Topic :: Database :: Database Engines/Servers",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Education",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: POSIX :: Linux",
"Operating System :: Unix",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS",
]
authors = [{name = "Abhishek Singh", email = "[email protected]"}]
maintainers = [{name = "Abhishek Singh", email = "[email protected]"}]
requires-python = ">=3.8"
dependencies = [
"billiard==4.2.1",
"msgpack==1.1.0",
"pyzmq==26.2.0",
"tornado==6.4.2",
"click==8.1.7",
"psutil>=7.0.0",
]

[project.readme]
file = "README.md"
content-type = "text/markdown"

[project.urls]
Homepage = "https://aosingh.github.io/sqlite_rx/"
Documentation = "https://aosingh.github.io/sqlite_rx/"
Source = "https://github.com/aosingh/sqlite_rx"
"Bug Tracker" = "https://github.com/aosingh/sqlite_rx/issues"
CI = "https://github.com/aosingh/sqlite_rx/actions"
"Release Notes" = "https://github.com/aosingh/sqlite_rx/releases"
License = "https://github.com/aosingh/sqlite_rx/blob/master/LICENSE"

[project.optional-dependencies]
cli = [
"click==8.1.7",
"rich==13.9.3",
"pygments==2.18.0",
]

[project.scripts]
sqlite-server = "sqlite_rx.cli.server:main"
sqlite-client = "sqlite_rx.cli.client:main"
sqlite-multi-server = "sqlite_rx.cli.multiserver:main"

[tool.setuptools]
zip-safe = false
package-dir = {sqlite_rx = "sqlite_rx"}
include-package-data = true
script-files = ["bin/curve-keygen"]
test-require = """
pytest
coverage"""

[tool.setuptools.packages.find]
where = ["sqlite_rx"]
exclude = ["tests"]
namespaces = false

[tool.coverage.run]
branch = true
concurrency = ["multiprocessing"]
parallel = true
source = ["sqlite_rx"]

[dependency-groups]
dev = [
"build>=1.2.2.post1",
"coverage>=7.6.1",
"files-to-prompt>=0.6",
"hatchling>=1.27.0",
"pip>=25.0.1",
"pytest>=8.3.4",
"setuptools>=75.3.0",
"twine>=6.1.0",
"wheel>=0.45.1",
]
3 changes: 3 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[pytest]
filterwarnings =
ignore:This process .* is multi-threaded, use of fork.* may lead to deadlocks:DeprecationWarning
5 changes: 0 additions & 5 deletions requirements.txt

This file was deleted.

7 changes: 0 additions & 7 deletions requirements_dev.txt

This file was deleted.

79 changes: 0 additions & 79 deletions setup.cfg

This file was deleted.

Loading