Example #1
0
 def test_std_install(self, data, tmpdir):
     self.prep(data, tmpdir)
     wheel.move_wheel_files(self.name,
                            self.req,
                            self.src,
                            scheme=self.scheme)
     self.assert_installed()
 def move_wheel_files(self, wheeldir, root=None):
     move_wheel_files(
         self.name, self.req, wheeldir,
         user=self.use_user_site,
         home=self.target_dir,
         root=root,
         pycompile=self.pycompile,
     )
 def move_wheel_files(self, wheeldir, root=None):
     move_wheel_files(
         self.name, self.req, wheeldir,
         user=self.use_user_site,
         home=self.target_dir,
         root=root,
         pycompile=self.pycompile,
     )
Example #4
0
    def test_install_prefix(self, data, tmpdir):
        prefix = os.path.join(os.path.sep, "some", "path")
        self.prep(data, tmpdir)
        wheel.move_wheel_files(self.name, self.req, self.src, root=tmpdir, prefix=prefix)

        bin_dir = "Scripts" if WINDOWS else "bin"
        assert os.path.exists(os.path.join(tmpdir, "some", "path", bin_dir))
        assert os.path.exists(os.path.join(tmpdir, "some", "path", "my_data"))
Example #5
0
def _install_wheels(requirement_set, target):
    wheel_download_dir = os.path.join(target, "wheels")
    lib_dir = os.path.join(target, "lib")
    scheme = {'purelib': lib_dir, 'platlib': lib_dir}
    for req in requirement_set.requirements.values():
        if req.editable:
            pass
        else:
            move_wheel_files(req.name, req, wheel_download_dir, scheme=scheme)
Example #6
0
 def move_wheel_files(self, wheeldir, root=None, strip_file_prefix=None):
     move_wheel_files(
         self.name, self.req, wheeldir,
         user=self.use_user_site,
         home=self.target_dir,
         root=root,
         pycompile=self.pycompile,
         isolated=self.isolated,
         strip_file_prefix=strip_file_prefix,
     )
Example #7
0
 def move_wheel_files(self, wheeldir, root=None, prefix=None):
     move_wheel_files(
         self.name, self.req, wheeldir,
         user=self.use_user_site,
         home=self.target_dir,
         root=root,
         prefix=prefix,
         pycompile=self.pycompile,
         isolated=self.isolated,
     )
Example #8
0
 def test_dist_info_contains_empty_dir(self, data, tmpdir):
     """
     Test that empty dirs are not installed
     """
     # e.g. https://github.com/pypa/pip/issues/1632#issuecomment-38027275
     self.prep(data, tmpdir)
     src_empty_dir = os.path.join(self.src_dist_info, "empty_dir", "empty_dir")
     os.makedirs(src_empty_dir)
     assert os.path.isdir(src_empty_dir)
     wheel.move_wheel_files(self.name, self.req, self.src, scheme=self.scheme)
     self.assert_installed()
     assert not os.path.isdir(os.path.join(self.dest_dist_info, "empty_dir"))
Example #9
0
    def test_install_prefix(self, data, tmpdir):
        prefix = os.path.join(os.path.sep, 'some', 'path')
        self.prep(data, tmpdir)
        wheel.move_wheel_files(
            self.name,
            self.req,
            self.src,
            root=tmpdir,
            prefix=prefix,
        )

        bin_dir = 'Scripts' if WINDOWS else 'bin'
        assert os.path.exists(os.path.join(tmpdir, 'some', 'path', bin_dir))
        assert os.path.exists(os.path.join(tmpdir, 'some', 'path', 'my_data'))
Example #10
0
    def test_install_prefix(self, data, tmpdir):
        prefix = os.path.join(os.path.sep, 'some', 'path')
        self.prep(data, tmpdir)
        wheel.move_wheel_files(
            self.name,
            self.req,
            self.src,
            root=tmpdir,
            prefix=prefix,
        )

        bin_dir = 'Scripts' if WINDOWS else 'bin'
        assert os.path.exists(os.path.join(tmpdir, 'some', 'path', bin_dir))
        assert os.path.exists(os.path.join(tmpdir, 'some', 'path', 'my_data'))
Example #11
0
 def test_dist_info_contains_empty_dir(self, data, tmpdir):
     """
     Test that empty dirs are not installed
     """
     # e.g. https://github.com/pypa/pip/issues/1632#issuecomment-38027275
     self.prep(data, tmpdir)
     src_empty_dir = os.path.join(
         self.src_dist_info, 'empty_dir', 'empty_dir')
     os.makedirs(src_empty_dir)
     assert os.path.isdir(src_empty_dir)
     wheel.move_wheel_files(
         self.name, self.req, self.src, scheme=self.scheme)
     self.assert_installed()
     assert not os.path.isdir(
         os.path.join(self.dest_dist_info, 'empty_dir'))
Example #12
0
 def test_std_install(self, data, tmpdir):
     self.prep(data, tmpdir)
     wheel.move_wheel_files(
         self.name, self.req, self.src, scheme=self.scheme)
     self.assert_installed()