Skip to content

Commit 084c660

Browse files
authored
Merge pull request #22 from arvkevi/new_packaging_guidelines
New packaging guidelines
2 parents 3c22092 + 2a9177c commit 084c660

File tree

8 files changed

+63
-107
lines changed

8 files changed

+63
-107
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.2.2
2+
current_version = 0.2.3
33
commit = True
44
tag = True
55

.github/workflows/github-actions.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,6 @@ jobs:
1919
toxpython: 'python3.9'
2020
tox_env: 'docs'
2121
os: 'ubuntu-latest'
22-
- name: 'py36 (ubuntu)'
23-
python: '3.6'
24-
toxpython: 'python3.6'
25-
python_arch: 'x64'
26-
tox_env: 'py36'
27-
os: 'ubuntu-latest'
28-
- name: 'py36 (windows)'
29-
python: '3.6'
30-
toxpython: 'python3.6'
31-
python_arch: 'x64'
32-
tox_env: 'py36'
33-
os: 'windows-latest'
34-
- name: 'py36 (macos)'
35-
python: '3.6'
36-
toxpython: 'python3.6'
37-
python_arch: 'x64'
38-
tox_env: 'py36'
39-
os: 'macos-latest'
4022
- name: 'py37 (ubuntu)'
4123
python: '3.7'
4224
toxpython: 'python3.7'

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
year = "2022"
2121
author = "Kevin Arvai"
2222
copyright = "{0}, {1}".format(year, author)
23-
version = release = "0.2.2"
23+
version = release = "0.2.3"
2424

2525
pygments_style = "trac"
2626
templates_path = ["."]

pyproject.toml

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,58 @@
11
[build-system]
2-
requires = [
3-
"setuptools>=30.3.0",
4-
"wheel",
5-
"matplotlib",
6-
"scikit-learn",
7-
"numpy",
8-
"pillow",
9-
"kneed"
2+
requires = ["setuptools>=61.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "img2cmap"
7+
version = "0.2.3"
8+
authors = [
9+
{ name="Kevin Arvai", email="[email protected]" },
10+
{ name="Marshall Krassenstein", email="[email protected]"},
11+
]
12+
description = "Create colormaps from images"
13+
readme = "README.md"
14+
requires-python = ">=3.7"
15+
classifiers = [
16+
"License :: OSI Approved :: MIT License",
17+
"Development Status :: 2 - Pre-Alpha",
18+
"Operating System :: OS Independent",
19+
"Intended Audience :: Developers",
20+
"Operating System :: Unix",
21+
"Operating System :: POSIX",
22+
"Operating System :: Microsoft :: Windows",
23+
"Operating System :: MacOS",
24+
"Programming Language :: Python",
25+
"Programming Language :: Python :: 3",
26+
"Programming Language :: Python :: 3 :: Only",
27+
"Programming Language :: Python :: 3.7",
28+
"Programming Language :: Python :: 3.8",
29+
"Programming Language :: Python :: 3.9",
30+
"Programming Language :: Python :: 3.10",
31+
"Programming Language :: Python :: Implementation :: CPython",
32+
"Topic :: Utilities",
33+
]
34+
keywords = ["colormap", "matplotlib", "kmeans", "data visualization"]
35+
dependencies = [
36+
"matplotlib>=3.4.2",
37+
"scikit-learn>=0.24.2",
38+
"numpy>=1.20.3",
39+
"pillow>=8.0.1",
40+
"kneed >=0.8.1",
1041
]
1142

43+
[project.optional-dependencies]
44+
dev = ["black", "requests", "tox"]
45+
streamlit= ["streamlit", "st-annotated-text"]
46+
all = ["black", "requests", "tox", "streamlit", "st-annotated-text"]
47+
48+
[project.license]
49+
file = "LICENSE"
50+
51+
[project.urls]
52+
"Homepage" = "https://github.com/arvkevi/kneed"
53+
"Bug Tracker" = "https://github.com/arvkevi/kneed/issues"
54+
1255
[tool.black]
1356
line-length = 140
14-
target-version = ['py36']
57+
target-version = ['py37', 'py38', 'py39', 'py310']
1558
skip-string-normalization = false

setup.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
[tool.setuptools.packages.find]
2+
where = ["src"]
3+
4+
[tool.setuptools.exclude-package-data]
5+
img2cmap = ["tests"]
6+
17
[flake8]
28
max-line-length = 140
39
exclude = .tox,.eggs,ci/templates,build,dist

setup.py

Lines changed: 1 addition & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,6 @@
11
#!/usr/bin/env python
22
# -*- encoding: utf-8 -*-
33

4-
import io
5-
import re
6-
from glob import glob
7-
from os.path import basename
8-
from os.path import dirname
9-
from os.path import join
10-
from os.path import splitext
11-
12-
from setuptools import find_packages
134
from setuptools import setup
145

15-
16-
def read(*names, **kwargs):
17-
with io.open(join(dirname(__file__), *names), encoding=kwargs.get("encoding", "utf8")) as fh:
18-
return fh.read()
19-
20-
21-
setup(
22-
name="img2cmap",
23-
version="0.2.2",
24-
license="MIT",
25-
description="Create colormaps from images",
26-
long_description="{}\n{}".format(
27-
re.compile("^.. start-badges.*^.. end-badges", re.M | re.S).sub("", read("README.rst")),
28-
re.sub(":[a-z]+:`~?(.*?)`", r"``\1``", read("CHANGELOG.rst")),
29-
),
30-
author="Kevin Arvai",
31-
author_email="[email protected]",
32-
url="https://github.com/arvkevi/img2cmap",
33-
packages=find_packages("src", exclude=["tests*"]),
34-
package_dir={"": "src"},
35-
py_modules=[splitext(basename(path))[0] for path in glob("src/*.py")],
36-
include_package_data=True,
37-
zip_safe=False,
38-
classifiers=[
39-
"Development Status :: 2 - Pre-Alpha",
40-
"Intended Audience :: Developers",
41-
"License :: OSI Approved :: MIT License",
42-
"Operating System :: Unix",
43-
"Operating System :: POSIX",
44-
"Operating System :: Microsoft :: Windows",
45-
"Operating System :: MacOS",
46-
"Programming Language :: Python",
47-
"Programming Language :: Python :: 3",
48-
"Programming Language :: Python :: 3 :: Only",
49-
"Programming Language :: Python :: 3.6",
50-
"Programming Language :: Python :: 3.7",
51-
"Programming Language :: Python :: 3.8",
52-
"Programming Language :: Python :: 3.9",
53-
"Programming Language :: Python :: 3.10",
54-
"Programming Language :: Python :: Implementation :: CPython",
55-
"Topic :: Utilities",
56-
],
57-
project_urls={
58-
"Documentation": "https://img2cmap.readthedocs.io/",
59-
"Changelog": "https://img2cmap.readthedocs.io/en/latest/changelog.html",
60-
"Issue Tracker": "https://github.com/arvkevi/img2cmap/issues",
61-
},
62-
keywords=[
63-
"matplotlib",
64-
"colormap",
65-
"image",
66-
],
67-
python_requires=">=3.6",
68-
install_requires=[
69-
"matplotlib",
70-
"scikit-learn",
71-
"numpy",
72-
"pillow",
73-
"kneed",
74-
],
75-
extras_require={
76-
"dev": ["black", "requests", "tox"],
77-
"streamlit": ["streamlit", "st-annotated-text"],
78-
"all": ["black", "requests", "tox", "streamlit", "st-annotated-text"],
79-
},
80-
)
6+
setup()

src/img2cmap/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from .convert import ImageConverter # noqa: F401, E999
22

3-
__version__ = "0.2.2"
3+
__version__ = "0.2.3"

tox.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@ envlist =
1313
clean,
1414
check,
1515
docs,
16-
{py36,py37,py38,py39,py310},
16+
{py37,py38,py39,py310},
1717
report
1818
ignore_basepython_conflict = true
1919

2020
[testenv]
2121
basepython =
22-
py36: {env:TOXPYTHON:python3.6}
2322
py37: {env:TOXPYTHON:python3.7}
2423
py38: {env:TOXPYTHON:python3.8}
2524
py39: {env:TOXPYTHON:python3.9}

0 commit comments

Comments
 (0)