diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2a65ae0..24df5dd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,8 +5,13 @@ name: Publish Quarto PyPi on: workflow_dispatch: inputs: + production: + description: "Production (Use PyPi, not Test.PyPi)" + required: false + type: boolean + default: false publish-release: - description: "Production Release" + description: "Publish Release (to PyPi or Test.PyPi)" required: false type: boolean default: false @@ -36,13 +41,18 @@ jobs: --user - name: Build run: python -m build + - name: Upload wheels + uses: actions/upload-artifact@v4 + with: + name: wheel-files + path: dist/*.whl - name: Clean Wheel run: rm -rf dist/quarto_cli*.whl - name: Publish package distributions to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 - if: ${{ ! inputs.publish-release }} + if: ${{ inputs.publish-release && ! inputs.production }} with: repository-url: https://test.pypi.org/legacy/ - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - if: ${{ inputs.publish-release }} + if: ${{ inputs.publish-release && inputs.production }} diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..21ffdd2 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,46 @@ +[build-system] +requires = ["setuptools >= 61.0"] +build-backend = "setuptools.build_meta" + +[tool.setuptools] +packages = ["quarto_cli"] + +[project] +name = "quarto-cli" +description = "Open-source scientific and technical publishing system built on Pandoc." +authors = [ + {name = "Charles Teague"}, + {name = "Carlos Scheidegger"}, +] +dynamic = ["version"] +readme = "README.md" +license = {file = "LICENSE"} +classifiers = [ + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'Intended Audience :: End Users/Desktop', + 'Intended Audience :: Information Technology', + 'Intended Audience :: Science/Research', + 'License :: OSI Approved :: MIT License', + 'Operating System :: MacOS :: MacOS X', + 'Operating System :: Microsoft :: Windows', + 'Operating System :: POSIX :: Linux', + 'Programming Language :: Python :: 3.7', + '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', +] +dependencies = [ + 'jupyter', + 'nbclient', + 'wheel' +] + +[project.urls] +Homepage="https://www.quarto.org" +Source="https://www.github.com/quarto-dev/quarto-cli" + +[project.scripts] +quarto = "quarto_cli.quarto:run" \ No newline at end of file diff --git a/setup.py b/setup.py index 580f3bc..1ae1b51 100644 --- a/setup.py +++ b/setup.py @@ -99,40 +99,7 @@ def no_compile(self, file_path): long_description = (this_directory / "README.md").read_text() setup( - name='quarto-cli', version=version, - description='Open-source scientific and technical publishing system built on Pandoc.', - long_description=long_description, - long_description_content_type='text/markdown', - author='Quarto Team, Posit PBC, and other contributors', - license='MIT', - project_urls = { - 'Homepage': 'https://www.quarto.org', - 'Source': 'https://www.github.com/quarto-dev/quarto-cli' - }, - classifiers = [ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'Intended Audience :: End Users/Desktop', - 'Intended Audience :: Information Technology', - 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: MIT License', - 'Operating System :: MacOS :: MacOS X', - 'Operating System :: Microsoft :: Windows', - 'Operating System :: POSIX :: Linux', - 'Programming Language :: Python :: 3.7', - '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', - ], - packages=['quarto_cli'], - entry_points={ - 'console_scripts': [ - 'quarto = quarto_cli.quarto:run', - ], - }, package_data={ '': ['version.txt'], 'quarto_cli': quarto_data @@ -141,9 +108,4 @@ def no_compile(self, file_path): cmdclass={ 'build_py': CustomBuild, }, - install_requires=[ - 'jupyter', - 'nbclient', - 'wheel', - ], )