diff --git a/httpdocs/dist b/httpdocs/dist index 5bd6580007..fb44a318b5 160000 --- a/httpdocs/dist +++ b/httpdocs/dist @@ -1 +1 @@ -Subproject commit 5bd6580007a1b87e5de38c7c1940ee1ff9a8d7e1 +Subproject commit fb44a318b550e4989a06b259375e1f3cd020ef10 diff --git a/python/Makefile b/python/Makefile index b0f77836c9..883efd8b56 100644 --- a/python/Makefile +++ b/python/Makefile @@ -1,12 +1,30 @@ -build: clean - mkdir -p ntopng_package/ntopng - cp __init__.py ntopng_package/ntopng - cp flow.py host.py interface.py ntopng.py ntopng_package/ntopng - cp setup.py ntopng_package +# +# https://packaging.python.org/en/latest/tutorials/packaging-projects/ +# -install: build - cd ntopng_package; pip install . +install: + pip3 install . clean: - /bin/rm -rf ntopng_package + /bin/rm -rf __pycache__ ntopng.egg-info build/ dist + + +build: clean + # python3 -m pip install --upgrade build + # python3 -m pip install --upgrade twine + python3 -m build + + +upload_test: build + # Test site + python3 -m twine upload --repository testpypi dist/* + + # Install package + # python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps ntopng + + +upload: build + # Official PyPy + python3 -m twine upload dist/* + pip3 install ntopng diff --git a/python/flow.py b/python/ntopng/flow.py similarity index 100% rename from python/flow.py rename to python/ntopng/flow.py diff --git a/python/host.py b/python/ntopng/host.py similarity index 100% rename from python/host.py rename to python/ntopng/host.py diff --git a/python/interface.py b/python/ntopng/interface.py similarity index 100% rename from python/interface.py rename to python/ntopng/interface.py diff --git a/python/ntopng.py b/python/ntopng/ntopng.py similarity index 100% rename from python/ntopng.py rename to python/ntopng/ntopng.py