Skip to content

Commit

Permalink
Merge pull request #3 from shugaoye/master
Browse files Browse the repository at this point in the history
Release 1.1.3
  • Loading branch information
passxyz authored Apr 5, 2021
2 parents 2149d70 + 7268e40 commit bbfd50b
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 10 deletions.
29 changes: 29 additions & 0 deletions kpclibpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,32 @@
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
#
__all__ = (
"__title__",
"__summary__",
"__uri__",
"__version__",
"__author__",
"__email__",
"__license__",
"__copyright__",
)

__copyright__ = "Copyright 2021 Roger Ye"

import importlib_metadata

try:
metadata = importlib_metadata.metadata("kpclibpy")


__title__ = metadata["name"]
__summary__ = metadata["summary"]
__uri__ = metadata["home-page"]
__version__ = metadata["version"]
__author__ = metadata["author"]
__email__ = metadata["author-email"]
__license__ = metadata["license"]
except ModuleNotFoundError:
__version__ = "1.1.3.dev2"
print("Debug build ", __version__)
3 changes: 2 additions & 1 deletion kpclibpy/commands/database_cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ def find(keywords: str):
break
else:
ctx.keepass.print_entry(entries[indexes[int(x)]])
except KeyError:
input('Please any key to continue')
except ValueError:
print("Wrong entry number, please choose a correct one or enter 'q' to quit")
else:
cprint("Please connect to a database first.", "red")
Expand Down
3 changes: 2 additions & 1 deletion kpclibpy/nubia_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
from nubia import exceptions
from nubia import eventbus
from kpclibpy.commands.keepass import KeePass
from kpclibpy import __version__

_keepass = KeePass()

class NubiaPassXYZContext(context.Context):
def __init__(self, *args, **kwargs):
self.keepass = _keepass
self.version = "1.1.0"
self.version = __version__
self._current_group = None
super().__init__()

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
requires = ["setuptools>=42", "wheel", "pycparser"]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=40.8", "wheel", "setuptools_scm>=1.15"]
build-backend = "setuptools.build_meta:__legacy__"

[tool.pytest.ini_options]
xfail_strict = true
Expand Down
12 changes: 12 additions & 0 deletions scripts/kp_debug
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import sys
import os

sys.path.append(os.getcwd())
from kpclibpy.__main__ import main

if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
from setuptools import setup, Command, Extension, find_packages
from setuptools.command.build_ext import build_ext

with open("README.md", "r", encoding="utf-8") as f:
with open("README.rst", "r", encoding="utf-8") as f:
long_description = f.read()

setup(
name="kpclibpy",
version="1.1.0",
#version="1.1.0",
description="KeePass command line application",
url="https://github.com/passxyz/KPCLibPy",
license="MIT",
author="Roger Ye",
author_email="[email protected]",
#package_dir={"": "src"},
#packages=find_packages(where="src"),
#package_data={'kpclibpy.kpclib': ['lib/*.dll']},
install_requires=["pycparser==2.20",
install_requires=[
"pycparser==2.20",
"importlib_metadata >= 3.6",
"pythonnet==2.5.2",
"python-nubia==0.2b5"],
long_description=long_description,
use_scm_version=True,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
Expand Down

0 comments on commit bbfd50b

Please sign in to comment.