From a3e46f68b494d270a54360f7906cfafbd873ae23 Mon Sep 17 00:00:00 2001 From: agricolab Date: Fri, 6 Dec 2019 17:41:04 +0100 Subject: [PATCH] Make package detectable --- MANIFEST.in | 1 + localite/__init__.py | 10 ++-------- makefile | 25 +++++++++++++++++++++++++ setup.py | 2 +- test/__init__.py | 0 test/flow/__init__,py | 0 6 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 MANIFEST.in create mode 100644 makefile delete mode 100644 test/__init__.py delete mode 100644 test/flow/__init__,py diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..310f95a --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +graft localite/flow \ No newline at end of file diff --git a/localite/__init__.py b/localite/__init__.py index ebf428d..de74a3d 100644 --- a/localite/__init__.py +++ b/localite/__init__.py @@ -1,8 +1,2 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -""" -@author: Robert Guggenberger -""" -#from localite.coil import Coil -#from localite.response import Response -# %% +__path__ = __import__("pkgutil").extend_path(__path__, __name__) + diff --git a/makefile b/makefile new file mode 100644 index 0000000..5ff3320 --- /dev/null +++ b/makefile @@ -0,0 +1,25 @@ +SHELL := /bin/bash #to be able to execute `source` + +.PHONY: build +build: clean + python setup.py sdist bdist_wheel + +.PHONY: clean +clean: + rm -rf dist */*.egg-info *.egg-info build + rm -rf .test + +.PHONY: test +test: build + twine check dist/* + # twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose + virtualenv .test + source .test/bin/activate + pip install git+https://github.com/labstreaminglayer/liblsl-Python.git + pip install dist/*.whl + pytest + +.PHONY: upload +upload: build + twine check dist/* + twine upload dist/* --verbose \ No newline at end of file diff --git a/setup.py b/setup.py index 358a000..22cc033 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ url="https://github.com/pyreiz/ctrl-localite", download_url="https://github.com/pyreiz/ctrl-localite", license="MIT", - packages=setuptools.find_packages(), + packages=["localite", "localite.flow"], entry_points={ "console_scripts": [ "ctrl-localite=localite.cli:ctrl", diff --git a/test/__init__.py b/test/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/flow/__init__,py b/test/flow/__init__,py deleted file mode 100644 index e69de29..0000000