diff --git a/Vagrantfile b/Vagrantfile index a4cc661..1351a7b 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -77,7 +77,7 @@ Vagrant.configure('2') do |config| pip install -U setuptools export PATH=/usr/local/bin/:$PATH - python setup.py install + pip install . giftwrap build -m #{GIFTWRAP_MANIFEST} #{GIFTWRAP_ARGS} if [ ! -z "#{GIFTWRAP_POSTBUILD_SCRIPT}" ]; then diff --git a/giftwrap/builders/docker_builder.py b/giftwrap/builders/docker_builder.py index bdd5ef9..f892995 100644 --- a/giftwrap/builders/docker_builder.py +++ b/giftwrap/builders/docker_builder.py @@ -92,15 +92,13 @@ class DockerBuilder(Builder): project_bin_path = os.path.join(project.install_path, 'bin') self._paths.append(project_bin_path) - venv_python_path = os.path.join(project_bin_path, 'python') venv_pip_path = os.path.join(project_bin_path, 'pip') if project.pip_dependencies: commands.append("%s install %s" % (venv_pip_path, ' '.join(project.pip_dependencies))) - commands.append('cd %s && %s setup.py install && cd -' % - (project_src_path, venv_python_path)) - commands.append("%s install pbr" % venv_pip_path) + commands.append("%s install %s" % (venv_pip_path, + project_src_path)) return commands diff --git a/giftwrap/builders/package_builder.py b/giftwrap/builders/package_builder.py index c8fa8e9..530808e 100644 --- a/giftwrap/builders/package_builder.py +++ b/giftwrap/builders/package_builder.py @@ -94,7 +94,6 @@ class PackageBuilder(Builder): # install into the virtualenv LOG.info("Installing '%s' to the virtualenv", project.name) - venv_python_path = os.path.join(install_path, 'bin/python') venv_pip_path = os.path.join(install_path, 'bin/pip') deps = " ".join(project.pip_dependencies) @@ -114,8 +113,7 @@ class PackageBuilder(Builder): if spec.settings.gerrit_dependencies: self._install_gerrit_dependencies(repo, project, install_path) - execute("%s setup.py install" % venv_python_path, project_src_path) - execute("%s install pbr" % venv_pip_path) + execute("%s install %s" % (venv_pip_path, project_src_path)) # now build the package pkg = Package(project.package_name, project.version,