Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
HubTou committed Dec 12, 2022
1 parent e9bd45b commit 8086a7d
Show file tree
Hide file tree
Showing 8 changed files with 497 additions and 0 deletions.
11 changes: 11 additions & 0 deletions License
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Copyright 2022+ Hubert Tournier

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
61 changes: 61 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
NAME=wis
SECTION=1
SOURCES=src/${NAME}/__init__.py src/${NAME}/main.py

# Default action is to show this help message:
.help:
@echo "Possible targets:"
@echo " check-code Verify PEP 8 compliance (lint)"
@echo " check-security Verify security issues (audit)"
@echo " check-unused Find unused code"
@echo " check-version Find required Python version"
@echo " check-sloc Count Single Lines of Code"
@echo " checks Make all the previous tests"
@echo " format Format code"
@echo " package Build package"
@echo " upload-test Upload the package to TestPyPi"
@echo " upload Upload the package to PyPi"
@echo " distclean Remove all generated files"

check-code: /usr/local/bin/pylint
-pylint ${SOURCES}

lint: check-code

check-security: /usr/local/bin/bandit
-bandit -r ${SOURCES}

audit: check-security

check-unused: /usr/local/bin/vulture
-vulture --sort-by-size ${SOURCES}

check-version: /usr/local/bin/vermin
-vermin ${SOURCES}

check-sloc: /usr/local/bin/pygount
-pygount --format=summary .

checks: check-code check-security check-unused check-version check-sloc

format: /usr/local/bin/black
black ${SOURCES}

love:
@echo "Not war!"

man/${NAME}.${SECTION}.gz: man/${NAME}.${SECTION}
@gzip -k9c man/${NAME}.${SECTION} > man/${NAME}.${SECTION}.gz

package: man/${NAME}.${SECTION}.gz
python -m build

upload-test:
python -m twine upload --repository testpypi dist/*

upload:
python -m twine upload dist/*

distclean:
rm -rf build dist src/*.egg-info man/${NAME}.${SECTION}.gz

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,4 @@ It is available under the [3-clause BSD license](https://opensource.org/licenses

## CAVEAT
[LACNIC](https://www.lacnic.net/) (Latin America and Caribbean NIC) does not provide a very useful bulk WhoIs database...

6 changes: 6 additions & 0 deletions man/wis.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.Dd December 12, 2022
.Dt WIS 1
.Os
.Sh NAME
.Nm wis
.Nd Bulk WhoIs search
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
]
build-backend = "setuptools.build_meta"
54 changes: 54 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[metadata]
name = pnu_wis
description = Bulk WhoIs Search
long_description = file: README.md
long_description_content_type = text/markdown
version = 0.9.0
license = BSD 3-Clause License
license_files = License
author = Hubert Tournier
author_email = hubert.tournier@gmail.com
url = https://github.com/HubTou/wis/
project_urls =
Bug Tracker = https://github.com/HubTou/wis/issues
keywords = pnu-project
classifiers =
Development Status :: 5 - Production/Stable
Environment :: Console
Intended Audience :: End Users/Desktop
License :: OSI Approved :: BSD License
Natural Language :: English
Operating System :: OS Independent
Operating System :: Microsoft :: Windows
Programming Language :: Python :: 3
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
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
Programming Language :: Python :: 3.11
Topic :: System
Topic :: Utilities

[options]
package_dir =
= src
packages = find:
python_requires = >=3.3
install_requires =
pnu-libpnu

[options.packages.find]
where = src

[options.entry_points]
console_scripts =
wis = wis:main

[options.data_files]
man/man1 =
man/wis.1.gz

2 changes: 2 additions & 0 deletions src/wis/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"""Wrapper for the source code files"""
from .main import *
Loading

0 comments on commit 8086a7d

Please sign in to comment.