Skip to content

Commit 4b48e49

Browse files
committed
Setup pypi publish
1 parent 6f6d972 commit 4b48e49

14 files changed

+171
-0
lines changed

CHANGELOG

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
Change Log
2+
==========
3+
4+
0.1.6 (01/03/2022)
5+
------------------
6+
- Create python-publish.yml
7+
8+
0.1.5 (01/03/2022)
9+
------------------
10+
- Change wait times and typos
11+
12+
0.1.4 (12/23/2021)
13+
------------------
14+
- Get name of the calling file gracefully
15+
- Log the action in route_53.py
16+
- Update README.md
17+
18+
0.1.3 (12/20/2021)
19+
------------------
20+
- Update README.md
21+
- Get rid of hard coded / for path
22+
23+
0.1.2 (12/20/2021)
24+
------------------
25+
- Make expose as a CLI tool
26+
27+
0.1.1 (12/20/2021)
28+
------------------
29+
- Add lost changes on nginx_server.py
30+
31+
0.1.0 (12/20/2021)
32+
------------------
33+
- Add sphinx auto-gen docs
34+
- Fix docstrings and module names
35+
36+
0.0.9 (12/20/2021)
37+
------------------
38+
- Format print statements in config to logger type
39+
- Change some function names
40+
41+
0.0.8 (12/20/2021)
42+
------------------
43+
- Use `paramiko` for interactive ssh setup
44+
45+
0.0.7 (12/20/2021)
46+
------------------
47+
- Add boto3 error handling
48+
49+
0.0.6 (12/19/2021)
50+
------------------
51+
- Enable `https` for the endpoints
52+
- Requires .pem files in .ssh or cwd
53+
54+
0.0.5 (12/19/2021)
55+
------------------
56+
- Add config files for SSL to enable https on the endpoint serving the app/api
57+
58+
0.0.4 (12/18/2021)
59+
------------------
60+
- Setup automatic configuration
61+
- Delete Route53 record when tunneling is to be closed
62+
- Onboard nginx.conf and server.conf
63+
64+
0.0.3 (12/18/2021)
65+
------------------
66+
- Onboard a script to add DNS records to a hosted zone
67+
- Modify logger formatting
68+
69+
0.0.2 (12/18/2021)
70+
------------------
71+
- Replicate EC2 creation part from vpn-server
72+
- Update .gitignore, LICENSE and README.md
73+
- Add requirements.txt and expose.py
74+
75+
0.0.1 (12/18/2021)
76+
------------------
77+
- Initial commit

__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from version import version_info
2+
3+
version = '.'.join(str(c) for c in version_info)

expose.py expose/expose.py

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

server.conf expose/server.conf

File renamed without changes.

setup.cfg

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[metadata]
2+
name = expose-localhost
3+
version = attr: version
4+
description = 'Expose an app/api running on local host to public internet using AWS EC2',
5+
long_description = file: README.md
6+
long_description_content_type = text/markdown; charset=UTF-8
7+
url = https://github.com/thevickypedia/expose
8+
9+
[bdist_wheel]
10+
universal = 1
11+
12+
[options]
13+
packages = find:
14+
15+
[flake8]
16+
ignore = D100
17+
max_line_length = 100
18+
exclude =
19+
# this is generally an empty file.
20+
doc_generator
21+
docs
22+
venv
23+
24+
# install flake8-docstrings
25+
docstring_convention = google
26+
27+
# install flake8-sfs
28+
extend_ignore=SFS3,D107,SFS301,D100,D104,D401
29+
30+
[isort]

setup.py

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
from os.path import dirname, isfile, join, realpath, sep
2+
3+
from setuptools import setup
4+
5+
from version import version_info
6+
7+
classifiers = [
8+
'Development Status :: 4 - Beta',
9+
'Intended Audience :: Information Technology',
10+
'Operating System :: MacOS :: MacOS X',
11+
'License :: OSI Approved :: MIT License',
12+
'Programming Language :: Python :: 3.9',
13+
'Topic :: System :: Networking :: Firewalls'
14+
]
15+
16+
17+
def read(name):
18+
"""Reads the file that was received as argument.
19+
20+
Args:
21+
name: Name of the file that has to be opened and read.
22+
23+
Returns:
24+
Content of the file that was read.
25+
26+
References:
27+
https://pythonhosted.org/an_example_pypi_project/setuptools.html#setting-up-setup-py
28+
"""
29+
with open(join(dirname(__file__), name)) as file:
30+
content = file.read()
31+
return content
32+
33+
34+
def dependencies() -> list:
35+
"""Gathers dependencies from requirements file.
36+
37+
Returns:
38+
List of dependencies to be installed.
39+
"""
40+
requirement_file = dirname(realpath(__file__)) + f'{sep}expose{sep}requirements.txt'
41+
if isfile(requirement_file):
42+
with open(requirement_file) as requirements:
43+
install_requires = requirements.read().splitlines()
44+
return install_requires
45+
46+
47+
setup(
48+
name='expose-localhost',
49+
version='.'.join(str(c) for c in version_info),
50+
description='Expose an app/api running on local host to public internet using AWS EC2',
51+
long_description=read('README.md') + '\n\n' + read('CHANGELOG'),
52+
url='https://github.com/thevickypedia/expose',
53+
author='Vignesh Sivanandha Rao',
54+
author_email='[email protected]',
55+
License='MIT',
56+
classifiers=classifiers,
57+
keywords='route53, certificate, ec2, ngrok-alternative, tunnel',
58+
packages=['.expose'],
59+
install_requires=dependencies()
60+
)

version.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version_info = (0, 1, 6)

0 commit comments

Comments
 (0)