<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<br>
<div class="moz-cite-prefix">On 05/09/17 17:41, Cédric Bosdonnat
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:20170905164124.11973-4-cbosdonnat@suse.com">
<pre wrap="">For sdist to package both the tests and sources, move the sources
up one level in the tree.
---
README.md | 2 +-
run | 2 +-
setup.py | 9 +++------
{src/virtBootstrap => virtBootstrap}/__init__.py | 0
{src/virtBootstrap => virtBootstrap}/progress.py | 0
{src/virtBootstrap => virtBootstrap}/sources/__init__.py | 0
{src/virtBootstrap => virtBootstrap}/sources/docker_source.py | 0
{src/virtBootstrap => virtBootstrap}/sources/file_source.py | 0
.../sources/virt_builder_source.py | 0
{src/virtBootstrap => virtBootstrap}/utils.py | 0
{src/virtBootstrap => virtBootstrap}/virt_bootstrap.py | 0
11 files changed, 5 insertions(+), 8 deletions(-)
rename {src/virtBootstrap => virtBootstrap}/__init__.py (100%)
rename {src/virtBootstrap => virtBootstrap}/progress.py (100%)
rename {src/virtBootstrap => virtBootstrap}/sources/__init__.py (100%)
rename {src/virtBootstrap => virtBootstrap}/sources/docker_source.py (100%)
rename {src/virtBootstrap => virtBootstrap}/sources/file_source.py (100%)
rename {src/virtBootstrap => virtBootstrap}/sources/virt_builder_source.py (100%)
rename {src/virtBootstrap => virtBootstrap}/utils.py (100%)
rename {src/virtBootstrap => virtBootstrap}/virt_bootstrap.py (100%)
diff --git a/README.md b/README.md
index ecb533e..40c2cc3 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ To test changes without installing the package in your machine,
use the run script. For example to run virt-bootstrap, use a command
like the following one:
- ./run src/virtBootstrap/virt_bootstrap.py --help
+ ./run virtBootstrap/virt_bootstrap.py --help
The following commands will be useful for anyone writing patches:
diff --git a/run b/run
index 5112034..a333fb3 100755
--- a/run
+++ b/run
@@ -16,5 +16,5 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <a class="moz-txt-link-rfc2396E" href="http://www.gnu.org/licenses/"><http://www.gnu.org/licenses/></a>.
-export PYTHONPATH=$PWD/src:$PYTHONPATH
+export PYTHONPATH=$PWD:$PYTHONPATH
$@
diff --git a/setup.py b/setup.py
index bca9955..1ed852f 100755
--- a/setup.py
+++ b/setup.py
@@ -12,9 +12,7 @@ import sys
import subprocess
import setuptools
from setuptools.command.install import install
-
-# pylint: disable=import-error, wrong-import-position
-sys.path.insert(0, 'src') # noqa: E402</pre>
</blockquote>
<blockquote type="cite"
cite="mid:20170905164124.11973-4-cbosdonnat@suse.com">
<pre wrap="">
+from setuptools.command.sdist import sdist
import virtBootstrap
@@ -75,7 +73,7 @@ class CheckPylint(setuptools.Command):
"""
res = 0
- files = ' '.join(["setup.py", "src/virtBootstrap/*.py", "tests/*.py"])
+ files = ' '.join(["setup.py", "virtBootstrap/*.py", "tests/*.py"])
output_format = "colorized" if sys.stdout.isatty() else "text"
print(">>> Running pycodestyle ...<a class="moz-txt-link-rfc2396E" href="mailto:)@@-105,8+103,7@@setuptools.setup(url='https://github.com/virt-manager/virt-bootstrap',#Whatdoesyourprojectrelateto?keywords='virtualizationcontainerrootfs',-package_dir={">")
@@ -105,8 +103,7 @@ setuptools.setup(
url='https://github.com/virt-manager/virt-bootstrap',
# What does your project relate to?
keywords='virtualization container rootfs',
- package_dir={"</a>": "src"},
- packages=setuptools.find_packages('src'),
+ packages=setuptools.find_packages(),
test_suite='tests',
entry_points={
'console_scripts': [
diff --git a/src/virtBootstrap/__init__.py b/virtBootstrap/__init__.py
similarity index 100%
rename from src/virtBootstrap/__init__.py
rename to virtBootstrap/__init__.py
diff --git a/src/virtBootstrap/progress.py b/virtBootstrap/progress.py
similarity index 100%
rename from src/virtBootstrap/progress.py
rename to virtBootstrap/progress.py
diff --git a/src/virtBootstrap/sources/__init__.py b/virtBootstrap/sources/__init__.py
similarity index 100%
rename from src/virtBootstrap/sources/__init__.py
rename to virtBootstrap/sources/__init__.py
diff --git a/src/virtBootstrap/sources/docker_source.py b/virtBootstrap/sources/docker_source.py
similarity index 100%
rename from src/virtBootstrap/sources/docker_source.py
rename to virtBootstrap/sources/docker_source.py
diff --git a/src/virtBootstrap/sources/file_source.py b/virtBootstrap/sources/file_source.py
similarity index 100%
rename from src/virtBootstrap/sources/file_source.py
rename to virtBootstrap/sources/file_source.py
diff --git a/src/virtBootstrap/sources/virt_builder_source.py b/virtBootstrap/sources/virt_builder_source.py
similarity index 100%
rename from src/virtBootstrap/sources/virt_builder_source.py
rename to virtBootstrap/sources/virt_builder_source.py
diff --git a/src/virtBootstrap/utils.py b/virtBootstrap/utils.py
similarity index 100%
rename from src/virtBootstrap/utils.py
rename to virtBootstrap/utils.py
diff --git a/src/virtBootstrap/virt_bootstrap.py b/virtBootstrap/virt_bootstrap.py
similarity index 100%
rename from src/virtBootstrap/virt_bootstrap.py
rename to virtBootstrap/virt_bootstrap.py
</pre>
</blockquote>
We need to update the line<br>
<br>
sys.path.insert(<span class="pl-c1">0</span>, <span
class="pl-s"><span class="pl-pds">'</span>../src<span
class="pl-pds">'</span></span>) <span class="pl-c"><span
class="pl-c">#</span> noqa: E402<br>
to<br>
</span><br>
<span class="pl-c"> sys.path.insert(<span class="pl-c1">0</span>,
<span class="pl-s"><span class="pl-pds">'</span>..<span
class="pl-pds">'</span></span>) <span class="pl-c"><span
class="pl-c">#</span> noqa: E402<br>
<br>
</span>in tests/__init__.py to ensure that the tests will be able
to import the virtBootstrap module correctly.</span><span
class="pl-c"><br>
<br>
</span>ACKed with this update<br>
</body>
</html>