2022-05-28 19:59:08 +00:00
|
|
|
import sys
|
|
|
|
|
|
|
|
vi = sys.version_info
|
|
|
|
if vi < (3, 7):
|
2022-11-16 19:28:46 +00:00
|
|
|
raise RuntimeError("socketify requires Python 3.7 or greater")
|
2022-05-28 19:59:08 +00:00
|
|
|
|
2022-11-04 22:54:38 +00:00
|
|
|
# if sys.platform in ('win32', 'cygwin', 'cli'):
|
|
|
|
# raise RuntimeError('socketify does not support Windows at the moment')
|
2022-05-28 19:59:08 +00:00
|
|
|
|
|
|
|
import setuptools
|
2022-11-16 19:28:46 +00:00
|
|
|
|
2022-11-04 22:54:38 +00:00
|
|
|
# from setuptools.command.sdist import sdist
|
|
|
|
# from setuptools.command.build_ext import build_ext
|
2022-05-28 22:49:16 +00:00
|
|
|
|
2022-11-04 22:54:38 +00:00
|
|
|
# import pathlib
|
|
|
|
# import os
|
|
|
|
# import shutil
|
|
|
|
# import subprocess
|
2022-05-28 19:59:08 +00:00
|
|
|
|
2022-11-04 22:54:38 +00:00
|
|
|
# _ROOT = pathlib.Path(__file__).parent
|
2022-05-28 22:49:16 +00:00
|
|
|
|
2022-11-04 22:54:38 +00:00
|
|
|
# UWS_DIR = str(_ROOT / "src" / "socketify" /"uWebSockets")
|
|
|
|
# UWS_BUILD_DIR = str(_ROOT / "build" /"uWebSockets")
|
2022-06-02 19:00:42 +00:00
|
|
|
|
2022-11-16 19:28:46 +00:00
|
|
|
# NATIVE_CAPI_DIR = str(_ROOT / "build" / "native")
|
2022-11-04 22:54:38 +00:00
|
|
|
# NATIVE_LIB_PATH = str(_ROOT / "build" / "libsocketify.so")
|
|
|
|
# NATIVE_DIR = str(_ROOT / "src" / "socketify" /"native")
|
|
|
|
# NATIVE_BUILD_DIR = str(_ROOT / "build" /"native")
|
|
|
|
# NATIVE_LIB_OUTPUT = str(_ROOT / "src" / "socketify" / "libsocketify.so")
|
2022-06-02 19:00:42 +00:00
|
|
|
|
|
|
|
|
2022-11-04 22:54:38 +00:00
|
|
|
# class Prepare(sdist):
|
|
|
|
# def run(self):
|
|
|
|
# super().run()
|
2022-10-31 23:51:16 +00:00
|
|
|
|
|
|
|
|
2022-11-04 22:54:38 +00:00
|
|
|
# class Makefile(build_ext):
|
|
|
|
# def run(self):
|
|
|
|
# env = os.environ.copy()
|
2022-11-16 19:28:46 +00:00
|
|
|
|
2022-11-04 22:54:38 +00:00
|
|
|
# if os.path.exists(UWS_BUILD_DIR):
|
|
|
|
# shutil.rmtree(UWS_BUILD_DIR)
|
|
|
|
# shutil.copytree(UWS_DIR, UWS_BUILD_DIR)
|
2022-05-28 19:59:08 +00:00
|
|
|
|
2022-11-04 22:54:38 +00:00
|
|
|
# if os.path.exists(NATIVE_CAPI_DIR):
|
|
|
|
# shutil.rmtree(NATIVE_CAPI_DIR)
|
|
|
|
# shutil.copytree(NATIVE_DIR, NATIVE_CAPI_DIR)
|
2022-06-02 19:00:42 +00:00
|
|
|
|
2022-11-04 22:54:38 +00:00
|
|
|
# subprocess.run(["make", "shared"], cwd=NATIVE_CAPI_DIR, env=env, check=True)
|
|
|
|
# shutil.move(NATIVE_LIB_PATH, NATIVE_LIB_OUTPUT)
|
2022-11-16 19:28:46 +00:00
|
|
|
|
2022-11-04 22:54:38 +00:00
|
|
|
# super().run()
|
2022-05-28 19:59:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
with open("README.md", "r", encoding="utf-8") as fh:
|
|
|
|
long_description = fh.read()
|
|
|
|
|
|
|
|
|
|
|
|
setuptools.setup(
|
|
|
|
name="socketify",
|
2023-01-18 19:04:41 +00:00
|
|
|
version="0.0.7",
|
2022-11-24 21:51:53 +00:00
|
|
|
platforms=["any"],
|
2022-05-28 19:59:08 +00:00
|
|
|
author="Ciro Spaciari",
|
|
|
|
author_email="ciro.spaciari@gmail.com",
|
2022-11-28 05:44:38 +00:00
|
|
|
description="Bringing WebSockets, Http/Https High Performance servers for PyPy3 and Python3",
|
2022-05-28 19:59:08 +00:00
|
|
|
long_description=long_description,
|
|
|
|
long_description_content_type="text/markdown",
|
|
|
|
url="https://github.com/cirospaciari/socketify.py",
|
|
|
|
project_urls={
|
2022-11-24 21:51:53 +00:00
|
|
|
"Bug Tracker": "https://github.com/cirospaciari/socketify.py/issues",
|
2022-05-28 19:59:08 +00:00
|
|
|
},
|
|
|
|
classifiers=[
|
|
|
|
"Programming Language :: Python :: 3",
|
|
|
|
"License :: OSI Approved :: MIT License",
|
|
|
|
"Operating System :: OS Independent",
|
|
|
|
],
|
2022-05-28 22:49:16 +00:00
|
|
|
packages=["socketify"],
|
2022-05-28 19:59:08 +00:00
|
|
|
package_dir={"": "src"},
|
2022-11-16 19:28:46 +00:00
|
|
|
package_data={
|
|
|
|
"": [
|
|
|
|
"./*.so",
|
2022-11-20 11:01:13 +00:00
|
|
|
"./*.dll",
|
2022-11-16 19:28:46 +00:00
|
|
|
"./uWebSockets/*",
|
|
|
|
"./uWebSockets/*/*",
|
|
|
|
"./uWebSockets/*/*/*",
|
|
|
|
"./native/*",
|
|
|
|
"./native/*/*",
|
|
|
|
"./native/*/*/*",
|
|
|
|
]
|
|
|
|
},
|
2022-05-28 19:59:08 +00:00
|
|
|
python_requires=">=3.7",
|
2022-11-24 21:51:53 +00:00
|
|
|
install_requires=["cffi>=1.0", "setuptools>=58.1.0"],
|
2022-05-28 22:49:16 +00:00
|
|
|
has_ext_modules=lambda: True,
|
2022-11-16 19:28:46 +00:00
|
|
|
cmdclass={}, # cmdclass={'sdist': Prepare, 'build_ext': Makefile},
|
|
|
|
include_package_data=True,
|
|
|
|
)
|