Skip to content

Commit 68d9b3f

Browse files
committed
Update to pyproject.toml, bump version to 0.5.1
1 parent 167d04c commit 68d9b3f

File tree

8 files changed

+50
-43
lines changed

8 files changed

+50
-43
lines changed

.github/workflows/python-app.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
sudo apt-get update
3030
sudo apt-get install --no-install-recommends -y wamerican
3131
python -m pip install --upgrade pip
32-
pip install flake8 twine wheel tox
32+
pip install flake8 twine wheel tox build
3333
pip install -r requirements.txt
3434
3535
- name: Lint with flake8

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ build: dist/keybox-$(VERSION).tar.gz
88
zipapp: $(BUILD)/keybox.pyz
99

1010
dist/keybox-$(VERSION).tar.gz:
11-
python3 setup.py sdist bdist_wheel
11+
python3 -m build
1212

1313
$(BUILD)/keybox.pyz: keybox
1414
rm -rf $(ZIPAPP)
@@ -20,16 +20,16 @@ cryptoref: cryptoref/cryptoref.pyx
2020
python3 setup.py build_ext --inplace
2121

2222
test:
23-
python3 setup.py pytest
23+
python3 -m pytest
2424

2525
.coverage: keybox tests .coveragerc
26-
coverage run setup.py pytest
26+
python3 -m coverage run -m pytest
2727

2828
cov: .coverage
29-
coverage report --show-missing --fail-under=70
29+
python3 -m coverage report --show-missing --fail-under=70
3030

3131
htmlcov: .coverage
32-
coverage html --show-contexts
32+
python3 -m coverage html --show-contexts
3333
open htmlcov/index.html
3434

3535
check: build

README.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ That's it. PIP should pull in the required dependencies.
5050
From source / Git repo
5151
``````````````````````
5252

53-
Alternatively, install from source::
53+
Alternatively, install from source using ``build`` tool::
54+
55+
# pip3 install --upgrade build
56+
python3 -m build
5457

55-
python3 setup.py install
5658

5759
The package can also run without installation, directly from source tree root::
5860

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.5.0
1+
0.5.1

pyproject.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[project]
2+
name = "keybox"
3+
description = "Simple password manager. Stores secrets in encrypted tab-delimited table."
4+
readme = "README.rst"
5+
authors = [{name="Radek Brich", email="[email protected]"}]
6+
license = "MIT"
7+
license-files = ["LICENSE"]
8+
urls = {github="https://github.com/rbrich/keybox"}
9+
requires-python = ">=3.9"
10+
classifiers = [
11+
"Programming Language :: Python :: 3",
12+
"Development Status :: 5 - Production/Stable",
13+
"Environment :: Console",
14+
"Intended Audience :: End Users/Desktop",
15+
"Topic :: Utilities",
16+
]
17+
18+
dependencies = ["pynacl", "prompt_toolkit", "blessed", "pyperclip"]
19+
optional-dependencies = {tester=["pytest", "argon2-cffi"]}
20+
21+
dynamic = ["version"]
22+
23+
[project.scripts]
24+
keybox = "keybox.main:main"
25+
26+
[build-system]
27+
requires = ["setuptools", "wheel", "cython"]
28+
build-backend = "setuptools.build_meta"

setup.cfg

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
[metadata]
2+
version = file: VERSION
3+
4+
[options]
5+
packages = keybox, keybox.backend
6+
include_package_data = True
7+
zip_safe = True
8+
19
[flake8]
210
max-line-length = 100
3-
4-
[tool:pytest]
5-
testpaths = tests

setup.py

100755100644
Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,7 @@
11
#!/usr/bin/env python3
22

3-
from setuptools import setup
4-
from pathlib import Path
5-
6-
try:
7-
from Cython.Build import cythonize
8-
except ImportError:
9-
def cythonize(*_args):
10-
return []
11-
12-
setup_dir = Path(__file__).parent
3+
from setuptools import setup, Extension
134

145
setup(
15-
name='keybox',
16-
version=(setup_dir / 'VERSION').read_text().strip(),
17-
description='Simple password manager. Stores secrets in encrypted tab-delimited table.',
18-
long_description=(setup_dir / "README.rst").read_text(),
19-
long_description_content_type='text/x-rst',
20-
author='Radek Brich',
21-
author_email='[email protected]',
22-
license='MIT',
23-
url='https://github.com/rbrich/keybox',
24-
packages=['keybox', 'keybox.backend'],
25-
include_package_data=True,
26-
entry_points={
27-
'console_scripts': [
28-
'keybox = keybox.main:main',
29-
],
30-
},
31-
ext_modules=cythonize('cryptoref/cryptoref.pyx'),
32-
setup_requires=['pytest-runner', 'Cython'],
33-
install_requires=['pynacl', 'prompt_toolkit', 'blessed', 'pyperclip'],
34-
tests_require=['pytest', 'argon2-cffi'],
6+
ext_modules=[Extension(name="cryptoref", sources=["cryptoref/cryptoref.pyx"])]
357
)

tests/test_shell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def dummy(*_args, **_kwargs):
6565
monkeypatch.setattr(ShellUI, '_input', feed_input, raising=True)
6666
monkeypatch.setattr(BaseUI, '_input', feed_input, raising=True)
6767
monkeypatch.setattr(BaseUI, '_input_pass', feed_input, raising=True)
68-
monkeypatch.setattr(BaseUI, '_copy', expect_copy, raising=True)
68+
monkeypatch.setattr(BaseUI, '_copy_secret', expect_copy, raising=True)
6969
monkeypatch.setattr(BaseInput, '__init__', dummy, raising=True)
7070
monkeypatch.setattr(BaseInput, 'input', feed_input, raising=True)
7171
monkeypatch.setattr(BaseInput, 'cancel', raise_timeout, raising=True)

0 commit comments

Comments
 (0)