Commit 4fd15b9d authored by Marcin Kasperski's avatar Marcin Kasperski
Browse files

Refactoring, monkeypatch_method moved to mercurial_extension_utils,

which is now required

Some PEP
parent b9b8b457bae2
......@@ -46,6 +46,7 @@ except:
from mercurial import mail
from mercurial.mail import SMTPS, STARTTLS
from mercurial import encoding
from urlparse import urlparse
import urllib2
import smtplib
......@@ -53,6 +54,7 @@ import socket
import os
import sys
from mercurial_extension_utils import monkeypatch_method
def import_keyring():
"""
......@@ -122,18 +124,6 @@ KEYRING_SERVICE = "Mercurial"
############################################################
def monkeypatch_method(cls, fname=None):
def decorator(func):
local_fname = fname
if local_fname is None:
local_fname = func.__name__
setattr(func, "orig", getattr(cls, local_fname, None))
setattr(cls, local_fname, func)
return func
return decorator
############################################################
class PasswordStore(object):
"""
Helper object handling keyring usage (password save&restore,
......
version = '0.7.1'
VERSION = '0.7.1'
# pylint: disable=unused-import
try:
from setuptools import setup, find_packages
......@@ -8,20 +10,20 @@ except ImportError:
use_setuptools()
from setuptools import setup, find_packages
long_description = open("README.txt").read()
LONG_DESCRIPTION = open("README.txt").read()
setup(
name = "mercurial_keyring",
version = version,
author = 'Marcin Kasperski',
author_email = 'Marcin.Kasperski@mekk.waw.pl',
url = 'http://bitbucket.org/Mekk/mercurial_keyring',
description = 'Mercurial Keyring Extension',
long_description = long_description,
license = 'BSD',
py_modules = ['mercurial_keyring'],
keywords = "mercurial hg keyring password",
classifiers = [
name="mercurial_keyring",
version=VERSION,
author='Marcin Kasperski',
author_email='Marcin.Kasperski@mekk.waw.pl',
url='http://bitbucket.org/Mekk/mercurial_keyring',
description='Mercurial Keyring Extension',
long_description=LONG_DESCRIPTION,
license='BSD',
py_modules=['mercurial_keyring'],
keywords="mercurial hg keyring password",
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
......@@ -32,6 +34,9 @@ setup(
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Version Control'
],
install_requires = ['keyring>=0.3'],
zip_safe = True,
install_requires=[
'keyring>=0.3',
'mercurial_extension_utils>=0.9.0',
],
zip_safe=True,
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment