Skip to content

Commit

Permalink
Add setup.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
roddhjav committed Jan 23, 2022
1 parent 74e8aa8 commit f2491ba
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 39 deletions.
53 changes: 53 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[metadata]
name = pass-audit
version = attr: pass_audit.__version__
description = A pass extension for auditing your password repository.
long_description = file: README.md
long_description_content_type = text/markdown
license = GPL3
url = https://github.com/roddhjav/pass-audit
author = Alexandre Pujol
author_email = alexandre@pujol.io
project_urls =
Documentation=https://github.com/roddhjav/pass-audit
Source=https://github.com/roddhjav/pass-audit
Issues=https://github.com/roddhjav/pass-audit/issues
Changelog=https://github.com/roddhjav/pass-audit/blob/master/CHANGELOG.md
keywords =
password-store
password
pass
pass-extension
audit
password-audit
haveibeenpwned
classifiers =
Development Status :: 5 - Production/Stable
Environment :: Console
Intended Audience :: End Users/Desktop
License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Operating System :: MacOS :: MacOS X
Operating System :: POSIX
Operating System :: POSIX :: BSD
Operating System :: POSIX :: Linux
Operating System :: Microsoft :: Windows
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: Security :: Cryptography

[options]
python_requires = >=3.6
zip_safe = True
packages = find:
install_requires =
requests
zxcvbn

[options.packages.find]
where = pass_audit
68 changes: 29 additions & 39 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,41 @@
# Copyright (C) 2017-2020 Alexandre PUJOL <alexandre@pujol.io>.

import os
from setuptools import setup
import sys
from pathlib import Path

about = {}
with open(os.path.join('pass_audit', '__init__.py')) as file:
exec(file.read(), about) # nosec pylint: disable=exec-used
from setuptools import setup

with open('README.md') as file:
long_description = file.read()

share = Path(sys.prefix, 'share')
base = '/usr'
if os.uname().sysname == 'Darwin':
base = '/usr/local'
lib = Path(base, 'lib', 'password-store', 'extensions')

if '--user' in sys.argv:
if 'PASSWORD_STORE_EXTENSIONS_DIR' in os.environ:
lib = Path(os.environ['PASSWORD_STORE_EXTENSIONS_DIR'])
else:
lib = Path.home() / '.password-store' / '.extensions'
if 'XDG_DATA_HOME' in os.environ:
share = Path(os.environ['XDG_DATA_HOME'])
else:
share = Path.home() / '.local' / 'share'

setup(
name=about['__title__'],
version=about['__version__'],
author=about['__author__'],
author_email=about['__email__'],
description=about['__summary__'],
long_description=long_description,
long_description_content_type='text/markdown',
license=about['__license__'],
url=about['__uri__'],
packages=['pass_audit'],
install_requires=[
'requests',
'zxcvbn'
],
python_requires='>=3.5',
zip_safe=True,
keywords=[
'password-store', 'password', 'pass', 'pass-extension',
'audit', 'password-audit', 'haveibeenpwned',
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: GNU General'
' Public License v3 or later (GPLv3+)',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Security :: Cryptography',
data_files=[
(str(share / 'man' / 'man1'), [
'share/man/man1/pass-audit.1'
]),
(str(share / 'bash-completion' / 'completions'), [
'share/bash-completion/completions/pass-audit'
]),
(str(share / 'zsh' / 'site-functions'), [
'share/zsh/site-functions/_pass-audit'
]),
(str(lib), ["audit.bash"]),
],
)

0 comments on commit f2491ba

Please sign in to comment.