Skip to content

Commit

Permalink
Prepare to release
Browse files Browse the repository at this point in the history
  • Loading branch information
greshilov committed Nov 12, 2021
2 parents df8a2bc + f7f589b commit 5a427a0
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 15 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Release

on:
release:
types: [published]


jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macos-10.15]

steps:
- uses: actions/checkout@v2
- name: Build wheels
uses: pypa/cibuildwheel@v2.2.2
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.9'

- name: Build sdist
run: python setup.py sdist

- uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@v1.4.2
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Viacheslav Greshilov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
3 changes: 0 additions & 3 deletions MANIFEST

This file was deleted.

9 changes: 9 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
include LICENSE
include README.md
include Makefile
graft pysegmenttree
graft tests
global-exclude *.pyc
include pysegmenttree/*.c
exclude pysegmenttree/*.so
exclude pysegmenttree/*.pyd
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=40", "wheel"]
requires = ["setuptools>=40", "wheel>=0.32"]


[tool.pytest.ini_options]
Expand Down
2 changes: 1 addition & 1 deletion pysegmenttree/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ._segmenttree import PySegmentTree, stree

__version__ = "0.1.0"
__version__ = "0.1.2"
__all__ = ["stree", "PySegmentTree"]
30 changes: 20 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import re
from distutils.core import Extension, setup
from pathlib import Path

from setuptools import Extension, setup

ROOT = Path(__file__).parent

CFLAGS = ["-O2"]
# CFLAGS = ["-O0", "-g", "-Wall"]

Expand All @@ -23,28 +25,36 @@
),
]


args = dict(
setup(
name="pysegmenttree",
version=version,
description="Segment Tree for python 3+",
url="https://github.com/greshilov/pysegmenttree.git",
author="Viacheslav Greshilov",
author_email="s@greshilov.me",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
],
author="Slava Greshilov",
author_email="s@greshilov.me",
license="MIT",
license_files=("LICENSE.txt",),
description="Segment Tree for python 3+",
long_description=(ROOT / "README.md").read_text().strip(),
long_description_content_type="text/markdown",
keywords=["segment", "tree", "range", "segment tree"],
packages=["pysegmenttree"],
python_requires=">=3.6",
include_package_data=True,
)

setup(
ext_modules=extensions,
**args,
)

0 comments on commit 5a427a0

Please sign in to comment.