mirror of https://github.com/DJ2LS/FreeDATA.git
Removed setup.py, fixed build of pip module
parent
9f8ba515ab
commit
602b982f81
|
|
@ -25,7 +25,7 @@ jobs:
|
|||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
pip install wheel
|
||||
pip install wheel build
|
||||
|
||||
- name: Build GUI
|
||||
working-directory: freedata_gui
|
||||
|
|
@ -35,7 +35,7 @@ jobs:
|
|||
|
||||
- name: Build package
|
||||
run: |
|
||||
python setup.py sdist bdist_wheel
|
||||
python -m build
|
||||
|
||||
- name: Publish to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@v1.13.0
|
||||
|
|
|
|||
|
|
@ -35,3 +35,7 @@ venv_3.11/
|
|||
venv/
|
||||
test_venv/
|
||||
freedata_server/lib/codec2/codec2/
|
||||
|
||||
# `python -m build` artifacts
|
||||
/dist/
|
||||
/*.egg-info/
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ def open_browser_after_delay(url, delay=2):
|
|||
webbrowser.open(url, new=0, autoraise=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
def main():
|
||||
host = ctx.config_manager.config.get('NETWORK', {}).get('modemaddress') or '0.0.0.0'
|
||||
port = int(ctx.config_manager.config.get('NETWORK', {}).get('modemport', 5000))
|
||||
|
||||
|
|
@ -150,3 +150,6 @@ if __name__ == "__main__":
|
|||
threading.Thread(target=open_browser_after_delay, args=(url, 2), daemon=True).start()
|
||||
|
||||
uvicorn.run(app, host=host, port=port, log_config=None, log_level="info")
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
|
|
|
|||
|
|
@ -42,8 +42,7 @@ dependencies = [
|
|||
"chardet",
|
||||
"colorama",
|
||||
"ordered-set",
|
||||
"nuitka<=2.8.4",
|
||||
"pyinstaller",
|
||||
"sqlalchemy",
|
||||
"websocket-client",
|
||||
"fastapi[standard]",
|
||||
"uvicorn[standard]",
|
||||
|
|
@ -64,7 +63,6 @@ test = [
|
|||
"pytest-cov",
|
||||
"pytest-rerunfailures",
|
||||
"pick",
|
||||
"sqlalchemy",
|
||||
]
|
||||
dev = [
|
||||
"autopep8",
|
||||
|
|
@ -72,6 +70,23 @@ dev = [
|
|||
"isort",
|
||||
"pycodestyle",
|
||||
]
|
||||
build = [
|
||||
"nuitka<=2.8.4",
|
||||
"pyinstaller",
|
||||
]
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = [ "." ]
|
||||
exclude = [
|
||||
"tools*",
|
||||
]
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
freedata_server = [ "lib/**/*" ]
|
||||
freedata_gui = [ "dist/**/*" ]
|
||||
|
||||
[tool.setuptools.dynamic]
|
||||
version = { attr = "freedata_server.constants.MODEM_VERSION"}
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = [ "tests" ]
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ ordered-set
|
|||
nuitka<=2.8.4
|
||||
pyinstaller
|
||||
websocket-client
|
||||
sqlalchemy
|
||||
fastapi[standard]
|
||||
uvicorn[standard]
|
||||
|
||||
|
|
@ -23,4 +24,3 @@ pytest
|
|||
pytest-cov
|
||||
pytest-rerunfailures
|
||||
pick
|
||||
sqlalchemy
|
||||
|
|
|
|||
36
setup.py
36
setup.py
|
|
@ -1,36 +0,0 @@
|
|||
from setuptools import setup, find_packages
|
||||
import freedata_server.constants as constants
|
||||
# Reading requirements.txt for dependencies
|
||||
with open('requirements.txt') as f:
|
||||
required = f.read().splitlines()
|
||||
|
||||
with open("README.md", "r", encoding="utf-8") as fh:
|
||||
long_description = fh.read()
|
||||
|
||||
setup(
|
||||
name='freedata',
|
||||
version=constants.MODEM_VERSION,
|
||||
packages=find_packages(where='.'),
|
||||
package_dir={'': '.'},
|
||||
install_requires=required,
|
||||
python_requires='>=3.10',
|
||||
author='DJ2LS',
|
||||
author_email='dj2ls@proton.me',
|
||||
description='INFO: THIS PACKAGE IS NOT YET WORKING - PLEASE USE THE OFFICIAL SCRIPT BASED SETUP',
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/markdown",
|
||||
url='https://github.com/DJ2LS/FreeDATA',
|
||||
license='GPL3.0',
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'freedata=freedata_server.server:main', # Points to the main() function in server.py
|
||||
],
|
||||
},
|
||||
include_package_data=True, # Ensure non-python files are included if specified
|
||||
package_data={
|
||||
# Include all files under any directory within the 'freedata_server' package
|
||||
'freedata_server': ['lib/**/*'], # Recursive include for all files in 'lib' and its subdirectories
|
||||
'freedata_gui': ['dist/**/*'], # gui folder
|
||||
|
||||
},
|
||||
)
|
||||
Loading…
Reference in New Issue