diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 55cd1ee..420d118 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -3,7 +3,7 @@ current_version = 0.1.12 commit = True tag = True -[bumpversion:file:setup.py] +[bumpversion:file:pyproject.toml] [bumpversion:file:.bumpversion.cfg] [git] diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index d5183b3..e25c4dc 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -1,9 +1,9 @@ -name: Publish Python 🐍 distributions 📦 to PyPI +name: Build, Bump Version, and Publish to PyPI on: push: branches: - - main # Replace with the branch you want to trigger the workflow on + - main # Only publish from main branch jobs: build-n-publish: @@ -33,10 +33,7 @@ jobs: run: | pip install -r test-requirements.txt python -m unittest discover -s tests - - name: Install pandoc - run: | - sudo apt-get update - sudo apt-get install -y pandoc + # Pandoc no longer needed - using markdown directly - name: Install pypa/build run: python -m pip install build - name: Build a binary wheel and a source tarball diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml new file mode 100644 index 0000000..4eb4d5f --- /dev/null +++ b/.github/workflows/test-build.yml @@ -0,0 +1,39 @@ +name: Test Build + +on: + push: + branches-ignore: + - main # Don't run on main since publish workflow handles it + pull_request: + branches: + - main + +jobs: + test-build: + name: Test Build Python 🐍 distributions 📦 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Run tests + run: | + pip install -r test-requirements.txt + python -m unittest discover -s tests + - name: Install pypa/build + run: python -m pip install build twine + - name: Build a binary wheel and a source tarball + run: python -m build --sdist --wheel --outdir dist/ + - name: Check distribution + run: twine check dist/* + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: python-package-distributions + path: dist/ \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c9b1e47..cc435fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,55 @@ [build-system] -requires = ["setuptools", "wheel", "pypandoc"] \ No newline at end of file +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "queuepipeio" +version = "0.1.12" +description = "A pipe-based I/O library for efficient data transfer between threads with filtering support" +readme = "README.md" +requires-python = ">=3.8" +license = "Apache-2.0" +authors = [ + {name = "Your Name", email = "your.email@example.com"}, # TODO: Update +] +maintainers = [ + {name = "Your Name", email = "your.email@example.com"}, # TODO: Update +] +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "Programming Language :: Python :: 3", + "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", + "Operating System :: OS Independent", +] +dependencies = [ + "tqdm", +] + +[project.optional-dependencies] +dev = [ + "boto3", + "black", + "flake8", + "bump2version", + "build", + "twine", +] +test = [ + "boto3", +] + +[project.urls] +Homepage = "https://github.com/yourusername/queuepipeio" # TODO: Update +Repository = "https://github.com/yourusername/queuepipeio" # TODO: Update +Issues = "https://github.com/yourusername/queuepipeio/issues" # TODO: Update + +[tool.setuptools] +packages = ["queuepipeio"] + +[tool.setuptools.package-data] +queuepipeio = ["py.typed"] \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index 5ba9f66..0000000 --- a/setup.py +++ /dev/null @@ -1,19 +0,0 @@ -from setuptools import setup, find_packages -import pypandoc - -long_description = pypandoc.convert_file("README.md", "rst") -setup( - name="queuepipeio", # Updated package name - version="0.1.12", - description="A pipe-based I/O library for efficient data transfer between threads with filtering support", - packages=find_packages(), - install_requires=["tqdm"], - classifiers=[ - "Development Status :: 3 - Alpha", - "Intended Audience :: Developers", - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python :: 3.11", - ], - long_description=long_description, - long_description_content_type="text/x-rst", -)