cpitclaudel / alectryon

A collection of tools for writing technical documents that mix Coq code and prose.
MIT License
236 stars 34 forks source link

PyPi package #41

Closed cpitclaudel closed 3 years ago

cpitclaudel commented 3 years ago

Distributing Alectryon as a PyPi package would make it easier to install. The steps are described here: https://packaging.python.org/tutorials/packaging-projects/

Bruno-366 commented 3 years ago

there is a github workflow called python-publish for this.

# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
  release:
    types: [created]

jobs:
  deploy:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: '3.x'
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install setuptools wheel twine
    - name: Build and publish
      env:
        TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
        TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
      run: |
        python setup.py sdist bdist_wheel
        twine upload dist/*
Zimmi48 commented 3 years ago

@cpitclaudel If this GitHub Action is all it takes to get Alectryon on PyPI, do you think that you could try it out?

cpitclaudel commented 3 years ago

I'd love to merge a PR, but I really don't have time at the moment (I'm going on a trip tomorrow :/)

Zimmi48 commented 3 years ago

OK. I think it goes beyond a PR by an external contributor, because you would have to set up some secret variables and all...

cpitclaudel commented 3 years ago

The github action isn't all it takes: someone needs to write the manifest file / setup.py. I don't know how they work, and I don't have enough time to learn right now :/ If someone writes that and locally tests installing the package, then I'll happily do the dance of registering the package on pypi and setup the needed secrets

Zimmi48 commented 3 years ago

OK thanks for clarifying!

cpitclaudel commented 3 years ago

Done in #46 :tada: