~frbrgeorge/PasswdqcPython

6fe7eaeaa72bcb96b56be1e6ab5b331365acc0ec — George V. Kouryachy (Fr. Br. George) 4 months ago 43558c6 master
Publish results
3 files changed, 32 insertions(+), 3 deletions(-)

M .build.yml
A MANIFEST.in
M setup.py
M .build.yml => .build.yml +19 -1
@@ 4,13 4,31 @@ packages:
  - python3-setuptools
  - gcc
  - python3-wheel
  - twine
  - python3-pip
  - unzip
  - patchelf
  - zsh
secrets:
  - 7838f337-2952-4fb1-a333-6a7f1af6c9f2
sources:
  - https://git.sr.ht/~frbrgeorge/PasswdqcPython
tasks:
  - setup: |
        pip install auditwheel
  - build: |
        cd PasswdqcPython
        python3 setup.py build
  - wheel: |
        cd PasswdqcPython
        python3 setup.py bdist_wheel

        python3 -m auditwheel repair -w dist --plat manylinux2014_x86_64 dist/*linux_x86_64*.whl
        rm dist/*linux_x86_64*.whl
  - sdist: |
        cd PasswdqcPython
        python3 setup.py sdist
  - publish: |
        cd PasswdqcPython
        set +x
        twine upload -u __token__ -p "`cat ~/.test-pypi`" --repository testpypi dist/*
        set -x

A MANIFEST.in => MANIFEST.in +3 -0
@@ 0,0 1,3 @@
include .build.yml
include test.py
include .gitmodules

M setup.py => setup.py +10 -2
@@ 1,7 1,9 @@
from setuptools import setup, Extension
from ctypes.util import find_library
import sys
OPT_SOLID = "--solid"

if (passwdqclib := find_library("passwdqc")):
if (passwdqclib := find_library("passwdqc") and OPT_SOLID not in sys.argv):
    passwdqc = Extension('passwdqc',
                        define_macros = [('MAJOR_VERSION', '1'),
                                         ('MINOR_VERSION', '0')],


@@ 11,6 13,8 @@ if (passwdqclib := find_library("passwdqc")):
else:
    import re
    import os
    if OPT_SOLID in sys.argv:
        sys.argv.remove(OPT_SOLID)
    srcdir = 'passwdqc'
    with open(os.path.join(srcdir, "Makefile")) as M:
        objs = re.findall(r"^OBJS_LIB = (.*)", M.read(), re.M)[0]


@@ 22,7 26,7 @@ else:
                        sources = ['passwdqc.c'] + sources)

setup (name = 'passwdqc',
       version = '1.0',
       version = '0.0.1',
       description = 'PasswdQC python wrapper',
       author = 'Fr. Br. George',
       author_email = 'george@altlinux.org',


@@ 31,4 35,8 @@ setup (name = 'passwdqc',
PasswdQC is a simple password strength checking PAM module,
and this Python module provides high-level bindings for libpasswdqc.
''',
       classifiers = [  'Programming Language :: C',
                        'License :: OSI Approved :: BSD License',
                        'Operating System :: POSIX :: Linux',
                     ],
       ext_modules = [passwdqc])