~ferruck/yafg

b793599ff419699d0d3275a3d410ebaf4ae7c59b — Philipp Trommler 8 months ago a7285a0
Support both Python 2.7 and Python 3.6

Also test both versions in the CI pipeline
3 files changed, 32 insertions(+), 7 deletions(-)

M .build.yml
M README.md
M setup.py
M .build.yml => .build.yml +21 -3
@@ 3,6 3,8 @@ image: ubuntu/bionic
packages:
    - python
    - python-pip
    - python3
    - python3-pip

secrets:
    - d622464e-897f-41d3-ba3e-d646c2fea762


@@ 12,18 14,34 @@ sources:

tasks:
    - setup: |
        pip install setuptools wheel twine
        pip3 install setuptools wheel twine virtualenv

    - tests: |
        # Access the virtualenv binary
        export PATH=$PATH:~/.local/bin

        # Begin tests
        cd yafg

        virtualenv -p python2 venv
        . venv/bin/activate
        pip install -r requirements.txt
        python -m unittest discover
        deactivate
        rm -rf venv

        virtualenv -p python3 venv
        . venv/bin/activate
        pip install -r requirements.txt
        python -m unittest discover
        deactivate
        rm -rf venv

    - deploy: |
        cd yafg
        if [ "$(git tag --points-at HEAD)" == "$(grep version setup.py | sed 's/.*\"\(.*\)\",/v\1/')" ]; then
            python setup.py sdist bdist_wheel
            python -m twine upload --config-file ~/.pypirc dist/*
            python3 setup.py sdist bdist_wheel --universal
            python3 -m twine upload --config-file ~/.pypirc dist/*
        fi

triggers:

M README.md => README.md +5 -3
@@ 1,8 1,10 @@
# yafg - Yet Another Figure Generator

*yafg* is yet another figure generator plugin for Python's Markdown and its HTML
output path. It's currently written and only tested with Python 2.7 and Markdown
3.1, but aims at supporting as many versions as possible.
*yafg* is yet another figure generator plugin for Python's Markdown. It's
written and tested with Python 2.7 and Python 3.6 as well as Markdown 3.1.1, but
aims at supporting as many versions as possible. If you encounter any problems
with the given versions or find yourself using *yafg* without problems with any
others, please give me a hint using the e-mail address listed below.

It uses the `title` attribute given to an image within Markdown to generate a
`<figure>` environment with a `<figcaption>` containing the `title`'s text,

M setup.py => setup.py +6 -1
@@ 21,6 21,11 @@ setuptools.setup(
            "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
            "Operating System :: OS Independent",
            "Programming Language :: Python",
            "Programming Language :: Python :: 2",
            "Programming Language :: Python :: 2.7",
            "Programming Language :: Python :: 3",
            "Programming Language :: Python :: 3.6",
            "Programming Language :: Python :: Implementation :: CPython",
            "Topic :: Documentation",
            "Topic :: Text Processing :: Markup",
        ],


@@ 37,7 42,7 @@ setuptools.setup(
        maintainer_email = "yafg@philipp-trommler.me",
        name = "yafg",
        packages = setuptools.find_packages(),
        python_requires = ">=2.7.15",
        python_requires = ">=2.7.15, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4",
        url = "https://git.sr.ht/~ferruck/yafg",
        version = "0.1",
)