From b797a101b659cfc3e2e67e3a3901f66b2dcaff2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl>
Date: Sun, 15 Mar 2020 21:47:31 +0100
Subject: [PATCH] try out travis

---
 .gitignore                               |  1 +
 .travis.yml                              | 10 ++++++++++
 cython_multibuild/__init__.py            |  2 +-
 cython_multibuild/build.py               |  6 +-----
 example/example_module/test3/__init__.py |  5 +++++
 example/example_module/test3/test3.pyx   |  2 ++
 example/tests/__init__.py                |  5 +++++
 example/tests/test_test.py               | 15 +++++++++++++++
 setup.cfg                                |  2 +-
 9 files changed, 41 insertions(+), 7 deletions(-)
 create mode 100644 .travis.yml
 create mode 100644 example/example_module/test3/__init__.py
 create mode 100644 example/example_module/test3/test3.pyx
 create mode 100644 example/tests/__init__.py
 create mode 100644 example/tests/test_test.py

diff --git a/.gitignore b/.gitignore
index 6a881cf..d65161d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@
 build
 */build
 */dist
+dist
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..2b75dc0
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,10 @@
+language: python
+python:
+ - "3.7"
+ - "3.8"
+cache: pip
+script:
+ - cd example
+ - python setup.py test
+install:
+ - python setup.py install
diff --git a/cython_multibuild/__init__.py b/cython_multibuild/__init__.py
index e0a721d..0b4c785 100644
--- a/cython_multibuild/__init__.py
+++ b/cython_multibuild/__init__.py
@@ -1,4 +1,4 @@
 from .build import build
 from .multibuild import Multibuild
 
-__version__ = '0.1'
\ No newline at end of file
+__version__ = '0.2'
\ No newline at end of file
diff --git a/cython_multibuild/build.py b/cython_multibuild/build.py
index d849051..5ee6e7d 100644
--- a/cython_multibuild/build.py
+++ b/cython_multibuild/build.py
@@ -1,8 +1,3 @@
-import logging
-import typing as tp
-
-logger = logging.getLogger(__name__)
-
 from Cython import Build
 
 old_cythonize = Build.cythonize
@@ -13,4 +8,5 @@ def build(extensions, *args, **kwargs):
         multibuild.generate()
     return old_cythonize([ext.for_cythonize() for ext in extensions], *args, **kwargs)
 
+
 Build.cythonize = build
diff --git a/example/example_module/test3/__init__.py b/example/example_module/test3/__init__.py
new file mode 100644
index 0000000..fa84e47
--- /dev/null
+++ b/example/example_module/test3/__init__.py
@@ -0,0 +1,5 @@
+import logging
+import typing as tp
+
+logger = logging.getLogger(__name__)
+
diff --git a/example/example_module/test3/test3.pyx b/example/example_module/test3/test3.pyx
new file mode 100644
index 0000000..0d8accb
--- /dev/null
+++ b/example/example_module/test3/test3.pyx
@@ -0,0 +1,2 @@
+def times_four(x):
+    return x*4
diff --git a/example/tests/__init__.py b/example/tests/__init__.py
new file mode 100644
index 0000000..fa84e47
--- /dev/null
+++ b/example/tests/__init__.py
@@ -0,0 +1,5 @@
+import logging
+import typing as tp
+
+logger = logging.getLogger(__name__)
+
diff --git a/example/tests/test_test.py b/example/tests/test_test.py
new file mode 100644
index 0000000..5d8dbc1
--- /dev/null
+++ b/example/tests/test_test.py
@@ -0,0 +1,15 @@
+from example_module.test import times_two
+from example_module.test2 import times_three
+from example_module.test3.test3 import times_four
+import unittest
+
+
+class TestExample(unittest.TestCase):
+    def test_two(self):
+        self.assertEqual(times_two(2), 4)
+
+    def test_three(self):
+        self.assertEqual(times_three(2), 6)
+
+    def test_four(self):
+        self.assertEqual(times_four(2), 8)
diff --git a/setup.cfg b/setup.cfg
index 1f60393..213d2ea 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -7,7 +7,7 @@ license_files = LICENSE
 author = Piotr Maślanka
 author_email = piotrm@smok.co
 description = Utilities for packing multiple pyx files into a single Cython extension
-url = https://github.com/smok-serwis/multibuild
+url = https://github.com/smok-serwis/cython-multibuild
 project-urls =
 	Code = https://github.com/smok-serwis/cython-multibuild
 	Issue tracker = https://github.com/smok-serwis/cython-multibuild/issues
-- 
GitLab