Skip to content

Commit 5a427a0

Browse files
committed
Prepare to release
2 parents df8a2bc + f7f589b commit 5a427a0

File tree

7 files changed

+107
-15
lines changed

7 files changed

+107
-15
lines changed

.github/workflows/release.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
8+
jobs:
9+
build_wheels:
10+
name: Build wheels on ${{ matrix.os }}
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-20.04, windows-2019, macos-10.15]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Build wheels
19+
uses: pypa/cibuildwheel@v2.2.2
20+
- uses: actions/upload-artifact@v2
21+
with:
22+
path: ./wheelhouse/*.whl
23+
24+
build_sdist:
25+
name: Build source distribution
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v2
29+
30+
- uses: actions/setup-python@v2
31+
name: Install Python
32+
with:
33+
python-version: '3.9'
34+
35+
- name: Build sdist
36+
run: python setup.py sdist
37+
38+
- uses: actions/upload-artifact@v2
39+
with:
40+
path: dist/*.tar.gz
41+
42+
upload_pypi:
43+
needs: [build_wheels, build_sdist]
44+
runs-on: ubuntu-latest
45+
if: github.event_name == 'release' && github.event.action == 'published'
46+
steps:
47+
- uses: actions/download-artifact@v2
48+
with:
49+
name: artifact
50+
path: dist
51+
52+
- uses: pypa/gh-action-pypi-publish@v1.4.2
53+
with:
54+
user: __token__
55+
password: ${{ secrets.PYPI_PASSWORD }}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Viacheslav Greshilov
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

MANIFEST

Lines changed: 0 additions & 3 deletions
This file was deleted.

MANIFEST.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
include LICENSE
2+
include README.md
3+
include Makefile
4+
graft pysegmenttree
5+
graft tests
6+
global-exclude *.pyc
7+
include pysegmenttree/*.c
8+
exclude pysegmenttree/*.so
9+
exclude pysegmenttree/*.pyd

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools>=40", "wheel"]
2+
requires = ["setuptools>=40", "wheel>=0.32"]
33

44

55
[tool.pytest.ini_options]

pysegmenttree/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from ._segmenttree import PySegmentTree, stree
22

3-
__version__ = "0.1.0"
3+
__version__ = "0.1.2"
44
__all__ = ["stree", "PySegmentTree"]

setup.py

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import re
2-
from distutils.core import Extension, setup
32
from pathlib import Path
43

4+
from setuptools import Extension, setup
5+
56
ROOT = Path(__file__).parent
7+
68
CFLAGS = ["-O2"]
79
# CFLAGS = ["-O0", "-g", "-Wall"]
810

@@ -23,28 +25,36 @@
2325
),
2426
]
2527

26-
27-
args = dict(
28+
setup(
2829
name="pysegmenttree",
2930
version=version,
30-
description="Segment Tree for python 3+",
31+
url="https://github.com/greshilov/pysegmenttree.git",
32+
author="Viacheslav Greshilov",
33+
author_email="s@greshilov.me",
3134
classifiers=[
35+
"Development Status :: 4 - Beta",
3236
"Intended Audience :: Developers",
37+
"License :: OSI Approved :: MIT License",
38+
"Operating System :: POSIX",
39+
"Operating System :: MacOS :: MacOS X",
40+
"Operating System :: Microsoft :: Windows",
3341
"Programming Language :: Python",
3442
"Programming Language :: Python :: 3",
3543
"Programming Language :: Python :: 3.6",
3644
"Programming Language :: Python :: 3.7",
3745
"Programming Language :: Python :: 3.8",
3846
"Programming Language :: Python :: 3.9",
47+
"Topic :: Software Development",
48+
"Topic :: Software Development :: Libraries",
3949
],
40-
author="Slava Greshilov",
41-
author_email="s@greshilov.me",
50+
license="MIT",
51+
license_files=("LICENSE.txt",),
52+
description="Segment Tree for python 3+",
53+
long_description=(ROOT / "README.md").read_text().strip(),
54+
long_description_content_type="text/markdown",
55+
keywords=["segment", "tree", "range", "segment tree"],
4256
packages=["pysegmenttree"],
4357
python_requires=">=3.6",
4458
include_package_data=True,
45-
)
46-
47-
setup(
4859
ext_modules=extensions,
49-
**args,
5060
)

0 commit comments

Comments
 (0)