Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-release v0.5.3 #4

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .github/workflows/build_pypi.yaml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/cibuildwheel.yaml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/prepublish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Test PyPI Build

on: [workflow_dispatch]

jobs:

build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["windows-latest", "ubuntu-latest", "macos-latest"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
python -m pip install cibuildwheel==2.14.1
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-*"
CIBW_SKIP: "*-win32 *-manylinux_i686 *-manylinux_2_5"
CIBW_ARCHS_WINDOWS: "AMD64"
CIBW_ARCHS_LINUX: "x86_64"
CIBW_ARCHS_MACOS: "x86_64 universal2"
- name: Archive wheels
uses: actions/upload-artifact@v3
with:
name: pre-release-wheels
path: ./wheelhouse/*.whl

build_source:
name: Build source distribution .tar.gz
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install "setuptools>=67.2.0"
pip install wheel build
- name: Build .tar.gz
run: |
python -m build --sdist
- name: Archive .tar.gz
uses: actions/upload-artifact@v3
with:
name: pre-release-wheels
path: dist/*.tar.gz
76 changes: 76 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Publish to PyPI

on:
push:
tags:
- "v*"

jobs:

build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["windows-latest", "ubuntu-latest", "macos-latest"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
python -m pip install cibuildwheel==2.14.1
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-*"
CIBW_SKIP: "*-win32 *-manylinux_i686 *-manylinux_2_5"
CIBW_ARCHS_WINDOWS: "AMD64"
CIBW_ARCHS_LINUX: "x86_64"
CIBW_ARCHS_MACOS: "x86_64 universal2"
- name: Archive wheels
uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

build_source:
name: Build source distribution .tar.gz
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install "setuptools>=67.2.0"
pip install wheel build
- name: Build .tar.gz
run: |
python -m build --sdist
- name: Archive .tar.gz
uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

publish_pypi:
name: Publish to PyPI
needs: [build_wheels, build_source]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- name: Collect and extract artifact
uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.MY_PYPI_API_TOKEN_2023_06_22 }}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Build and Test
name: Test Simple

on: [workflow_dispatch]

jobs:
build_and_test:
name: "${{ matrix.os }} + python ${{ matrix.python-version }}"
Expand Down Expand Up @@ -33,7 +35,6 @@ jobs:
- name: Archive wheels
uses: actions/upload-artifact@v3
with:
name: dist-wheels-all
name: test-wheels
path: |
dist
!dist/**/*.md
dist/*.whl
4 changes: 3 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ recursive-include lap *
recursive-include lap/tests *
exclude lap/_lapjv.cpp
global-exclude */__pycache__
global-exclude *.pyc
global-exclude *.pyc
prune .github
prune .githubtest
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
[![Build and Test](https://github.com/rathaROG/lapx/actions/workflows/build_and_test.yaml/badge.svg)](https://github.com/rathaROG/lapx/actions/workflows/build_and_test.yaml)
[![Build PyPI](https://github.com/rathaROG/lapx/actions/workflows/build_pypi.yaml/badge.svg)](https://github.com/rathaROG/lapx/actions/workflows/build_pypi.yaml)
[![Test Simple](https://github.com/rathaROG/lapx/actions/workflows/test.yaml/badge.svg)](https://github.com/rathaROG/lapx/actions/workflows/test.yaml)
[![Test PyPI Build](https://github.com/rathaROG/lapx/actions/workflows/prepublish.yaml/badge.svg)](https://github.com/rathaROG/lapx/actions/workflows/prepublish.yaml)
[![Publish to PyPI](https://github.com/rathaROG/lapx/actions/workflows/publish.yaml/badge.svg)](https://github.com/rathaROG/lapx/actions/workflows/publish.yaml)

# Linear Assignment Problem Solver

* `lapx` is a customized edition of Tomas Kazmar's [`gatagat/lap`](https://github.com/gatagat/lap).
* License: BSD-2-Clause, see [`LICENSE`](LICENSE).
* Source code and credit: [lap05-0.5.1.tar.gz](https://files.pythonhosted.org/packages/05/71/5531017a60f5028c87ce34514f2b55d35a2999f6c6e587d1f56e6ee78b10/lap05-0.5.1.tar.gz) @[`gatagat`](https://github.com/gatagat) @[`remram44`](https://github.com/gatagat/lap/issues/34#issue-1114097201).
`lapx` basically is Tomas Kazmar's [`gatagat/lap`](https://github.com/gatagat/lap) with support for all Windows/Linux/macOS and Python 3.7/3.8/3.9/3.10/3.11.

* License: BSD-2-Clause, see [`LICENSE`](LICENSE)
* Based source code : [lap05-0.5.1.tar.gz](https://files.pythonhosted.org/packages/05/71/5531017a60f5028c87ce34514f2b55d35a2999f6c6e587d1f56e6ee78b10/lap05-0.5.1.tar.gz)
* Credits: @[`gatagat`](https://github.com/gatagat) @[`remram44`](https://github.com/gatagat/lap/issues/34#issue-1114097201)

## Windows ✅ | Linux ✅ | macOS ✅
## Installation: Windows ✅ | Linux ✅ | macOS ✅

* Build passed on all [Windows/Linux/macOS](https://github.com/rathaROG/lapx/actions/workflows/build_and_test.yaml) with Python 3.7/3.8/3.9/3.10/3.11 ✅

* Install `tar.gz` or wheels from [GitHub releases](https://github.com/rathaROG/lapx/releases) or [PyPI](https://pypi.org/project/lapx/):
* Install from [PyPI](https://pypi.org/project/lapx/):

```
pip install lapx
```

* Or directly install from GitHub repo:
* Or install `.tar.gz` or `.whl` from [GitHub releases](https://github.com/rathaROG/lapx/releases) or install from GitHub repo:

```
pip install git+https://github.com/rathaROG/lapx.git
Expand Down
2 changes: 1 addition & 1 deletion lap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import sys

__version__ = '0.5.2.post1'
__version__ = '0.5.3'

try:
__LAP_SETUP__
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build-system]
requires = ["setuptools>=67.2.0", "Cython>=0.29.32", "numpy>=1.21.6"]
build-backend = "setuptools.build_meta"
build-backend = "setuptools.build_meta"
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# # # # # # # # # # # # # # # # # # # # # #
# Rewrite on 2023/06/24 by rathaROG #
# Rewrote on 2023/06/24 by rathaROG #
# Updated on 2023/07/19 by rathaROG #
# # # # # # # # # # # # # # # # # # # # # #


Expand All @@ -9,7 +10,7 @@

###################################################################

DESCRIPTION = "Customized Tomas Kazmar's lap, Linear Assignment Problem solver (LAPJV/LAPMOD)."
DESCRIPTION = "Linear Assignment Problem solver (LAPJV/LAPMOD)."
LICENSE = 'BSD-2-Clause'
LONG_DESCRIPTION = open("README.md", encoding="utf-8").read()

Expand Down Expand Up @@ -66,7 +67,6 @@ def run(self):
def main_setup():
"""Use modern setup()
"""

import os
from Cython.Build import cythonize
_lapjvpyx = os.path.join(_lapjv, '_lapjv.pyx')
Expand Down Expand Up @@ -124,7 +124,7 @@ def main_setup():
'Operating System :: Unix',
'Operating System :: MacOS',],
ext_modules=cythonize(ext_modules),
cmdclass={'ccythonize': ExportCythonCommand,},
cmdclass={'cmdexport': ExportCythonCommand,},
)

def read_requirments():
Expand Down