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:
Debanjum Singh Solanky
2023-02-15 19:02:30 -06:00
parent c641eb4ad6
commit dcb86c2d3e
4 changed files with 78 additions and 60 deletions

View File

@@ -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: |