Exemple #1
0
 def email(git, value):
     if value:
         run(f'echo "email={escape(value)}" | git credential approve')
         # git(f'config --global user.email "{escape(value)}"')
         git._email = value
     else:
         git._email = git.get_email()
Exemple #2
0
 def username(git, value):
     if value:
         run(f'echo "username={escape(value)}" | git credential approve')
         # git(f'config --global user.name "{escape(value)}"')
         git._username = value
     else:
         git._username = git.get_username()
Exemple #3
0
 def password(git, value):
     if value:
         # run(f'echo "url={git.remote_protocol}{urlencode(git.username)}:{urlencode(value)}@{git.url[len(git.remote_protocol):]}" | git credential approve')
         run(f'echo "password={escape(value)}" | git credential approve')
         # git(f'config --global user.password "{escape(value)}"')
         git._password = value
     else:
         git._password = try_or_none(git.get_password)
Exemple #4
0
    def create_wheels():
        wheels = []
        if not pip.exist('wheel'):
            pip.install('wheel')
        for name in reversed(PackageManager.vcs_ord):
            pkg = PackageManager.vcs_packages[name]

            # if pkg.link in PackageManager.satisfied:
            #     PackageManager.satisfied.append(pkg.link)
            #     log.info(f'{pkg.link} requirement already satisfied -> {name}=={PackageManager.installed[name]}')
            #     continue
            # else:

            # create wheel
            run('cd', pkg.path, '&&', executable,
                'setup.py bdist_wheel --universal')
            for fn in listdir(pkg.dist_path):
                if fn.endswith('.whl'):
                    wheels.append(pkg.dist_path + sep + fn)
                    # print(get_metadata(wheel).requires_dist)
                    break
        return wheels
Exemple #5
0
 def __call__(self, *args):
     return run('cd', self.root, '&&', 'git', *args)