-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renamed main file and created setup.py
renamed lowercase slimhttp to slimHTTP to better reflect the projects name, also to make it a bit clearer what you're importing. Added a __init__ to be able to import this folder as-is when git cloning and use it the same way as after doing pip install.
- Loading branch information
Showing
4 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
**/*__pycache__ | ||
**/*_build | ||
**/**__pycache__ | ||
**/**dist | ||
**/**build | ||
**/**egg-info | ||
**/**slimHTTP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .slimHTTP import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import setuptools, glob, os, shutil | ||
|
||
with open("README.md", "r") as fh: | ||
long_description = fh.read() | ||
|
||
## Build steps (prerequisits) | ||
# TODO: Perhaps not rename it core.py when copying in the lib? | ||
# Probably doesn't matter to much, but looks odd. | ||
# Can we re-use the __init__.py from main repo? | ||
if not os.path.isdir('slimHTTP'): | ||
os.makedirs('./slimHTTP') | ||
if not os.path.isfile('./slimHTTP/core.py'): | ||
shutil.copy2('./slimHTTP.py', './slimHTTP/core.py') | ||
if not os.path.isfile('./slimHTTP/__init__.py'): | ||
with open('./slimHTTP/__init__.py', 'w') as __init__: | ||
__init__.write('from .core import *\n') | ||
if not os.path.isdir('./slimHTTP/examples'): | ||
shutil.copytree('./examples', './slimHTTP/examples') | ||
|
||
setuptools.setup( | ||
name="slimHTTP", | ||
version="1.0.1rc3", | ||
author="Anton Hvornum", | ||
author_email="anton@hvornum.se", | ||
description="A minimalistic non-threaded HTTP server written in Python. Supports REST & WebSockets¹.", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/Torxed/slimHTTP", | ||
packages=setuptools.find_packages(), | ||
classifiers=[ | ||
"Programming Language :: Python :: 3.8", | ||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)", | ||
"Operating System :: POSIX", | ||
"Operating System :: Microsoft", | ||
], | ||
python_requires='>=3.8', | ||
package_data={'slimHTTP': glob.glob('examples/*.py')}, | ||
) |
File renamed without changes.