summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2015-01-21 15:14:24 -0500
committerBarry Warsaw <barry@python.org>2015-01-21 15:14:24 -0500
commitee4a174e2e3b3268ef95485b99d81edea1ca3458 (patch)
treeed6ece63e85aea7782227159f4cf0e57c4b1a99e
parent8d453d2a4da4492857a4487b14fe7b11a014115b (diff)
downloadvyos-cloud-init-ee4a174e2e3b3268ef95485b99d81edea1ca3458.tar.gz
vyos-cloud-init-ee4a174e2e3b3268ef95485b99d81edea1ca3458.zip
* Added a simple tox.ini file
* Use universal_newlines in setup.py so it will work properly in Python 3. * Fix a pyflakes complaint in setup.py * Add a simple MANIFEST.in
-rw-r--r--.bzrignore3
-rw-r--r--MANIFEST.in8
-rwxr-xr-xsetup.py7
-rw-r--r--tox.ini13
4 files changed, 28 insertions, 3 deletions
diff --git a/.bzrignore b/.bzrignore
new file mode 100644
index 00000000..32f5a949
--- /dev/null
+++ b/.bzrignore
@@ -0,0 +1,3 @@
+.tox
+dist
+cloud_init.egg-info
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 00000000..90f6c7d5
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,8 @@
+include *.py MANIFEST.in ChangeLog
+global-include *.txt *.rst *.ini *.in *.conf *.cfg *.sh
+graft tools
+prune build
+prune dist
+prune .tox
+prune .bzr
+exclude .bzrignore
diff --git a/setup.py b/setup.py
index 25f09e58..507d5b25 100755
--- a/setup.py
+++ b/setup.py
@@ -45,7 +45,8 @@ def tiny_p(cmd, capture=True):
stdout = None
stderr = None
sp = subprocess.Popen(cmd, stdout=stdout,
- stderr=stderr, stdin=None)
+ stderr=stderr, stdin=None,
+ universal_newlines=True)
(out, err) = sp.communicate()
ret = sp.returncode
if ret not in [0]:
@@ -144,9 +145,9 @@ class InitsysInstallData(install):
raise DistutilsArgError(
"Invalid --init-system: %s" % (','.join(bad)))
- for sys in self.init_system:
+ for system in self.init_system:
self.distribution.data_files.append(
- (INITSYS_ROOTS[sys], INITSYS_FILES[sys]))
+ (INITSYS_ROOTS[system], INITSYS_FILES[system]))
# Force that command to reinitalize (with new file list)
self.distribution.reinitialize_command('install_data', True)
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 00000000..883f6196
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,13 @@
+[tox]
+envlist = py26,py27,py34
+recreate = True
+
+[testenv]
+commands = python -m nose tests
+deps =
+ httpretty>=0.7.1
+ mock
+ mocker
+ nose
+ pep8==1.5.7
+ pyflakes