mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Build khoj python package using hatchling, pyproject.toml
- Why
- pyprojects.toml is the python standards compliant config format
- allows collating python tooling configs into single standard file
- hatch(-ling) is a new lightweight build system for python packages
- Detailed Changes
- Replace setup.py, setuptools with pyproject.toml, hatchling for
khoj python config and build
- move pytest into optional development dependencies
- add more links to khoj in the project urls section
- add topic classifiers and keywords to find khoj package
- Delete setup.py, MANIFEST.in as moved to pyproject.toml based setup
- Update pypi workflow to set python package version in pyproject.toml
This commit is contained in:
4
.github/workflows/pypi.yml
vendored
4
.github/workflows/pypi.yml
vendored
@@ -37,13 +37,13 @@ jobs:
|
||||
|
||||
- name: 📝 Set Pre-Release Version for Master
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: sed -E -i "s/version=(.*)',/version=\1a$(date +%s)',/g" setup.py
|
||||
run: sed -E -i "s/version = (.*)\"/version = \1a$(date +%s)\"/g" pyproject.toml
|
||||
|
||||
- name: 📝 Set Development Version for PR
|
||||
if: github.event_name == 'pull_request'
|
||||
env:
|
||||
PULL_REQUEST_NUMBER: ${{ github.event.number }}
|
||||
run: sed -E -i "s/version=(.*)',/version=\1.dev$PULL_REQUEST_NUMBER$(date +%s)',/g" setup.py
|
||||
run: sed -E -i "s/version = (.*)\"/version = \1.dev$PULL_REQUEST_NUMBER$(date +%s)\"/g" pyproject.toml
|
||||
|
||||
- name: ⚙️ Build Python Package
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user