diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 3a361ab..1c4af91 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -8,22 +8,33 @@ permissions: jobs: build-n-publish: name: Build and publish Python 🐍 distributions 📦 to PyPI - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@master - name: Set up Python 3.7 uses: actions/setup-python@v1 with: python-version: 3.7 + + - name: remove old pip + run: sudo apt remove python-pip + + - name: wget get-pip.py + run: wget https://bootstrap.pypa.io/get-pip.py + + - name: install pip + run: python3 get-pip.py + - name: Install pypa/build run: >- - python -m + python3 -m pip install build --user + - name: Build a binary wheel and a source tarball run: >- - python -m + python3 -m build --sdist --wheel diff --git a/ez_setup.py b/ez_setup.py index b74adc0..a46da0f 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -70,9 +70,10 @@ def _validate_md5(egg_name, data): if egg_name in md5_data: digest = md5(data).hexdigest() if digest != md5_data[egg_name]: - print >>sys.stderr, ( + print( "md5 validation of %s failed! (Possible download problem?)" - % egg_name + % egg_name, + file=sys.stderr ) sys.exit(2) return data @@ -103,14 +104,14 @@ def do_download(): return do_download() try: pkg_resources.require("setuptools>="+version); return - except pkg_resources.VersionConflict, e: + except pkg_resources.VersionConflict as e: if was_imported: - print >>sys.stderr, ( - "The required version of setuptools (>=%s) is not available, and\n" - "can't be installed while this script is running. Please install\n" - " a more recent version first, using 'easy_install -U setuptools'." - "\n\n(Currently using %r)" - ) % (version, e.args[0]) + print(( + "The required version of setuptools (>=%s) is not available, and\n" + "can't be installed while this script is running. Please install\n" + "a more recent version first, using 'easy_install -U setuptools'." + "\n\n(Currently using %r)" + ) % (version, e.args[0]), file=sys.stderr) sys.exit(2) except pkg_resources.DistributionNotFound: pass @@ -159,7 +160,7 @@ def download_setuptools( # Read/write all in one block, so we don't create a corrupt file # if the download is interrupted. data = _validate_md5(egg_name, src.read()) - dst = open(saveto,"wb"); dst.write(data) + dst = open(saveto, "wb"); dst.write(data) finally: if src: src.close() if dst: dst.close() @@ -216,13 +217,14 @@ def main(argv, version=DEFAULT_VERSION): os.unlink(egg) else: if setuptools.__version__ == '0.0.1': - print >>sys.stderr, ( + msg = ( "You have an obsolete version of setuptools installed. Please\n" "remove it from your system entirely before rerunning this script." ) + print(msg, file=sys.stderr) sys.exit(2) - req = "setuptools>="+version + req = "setuptools>=" + version import pkg_resources try: pkg_resources.require(req) @@ -238,8 +240,8 @@ def main(argv, version=DEFAULT_VERSION): from setuptools.command.easy_install import main main(argv) else: - print "Setuptools version",version,"or greater has been installed." - print '(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)' + print("Setuptools version",version,"or greater has been installed.") + print('Run "ez_setup.py -U setuptools" to reinstall or upgrade.') def update_md5(filenames): """Update our built-in md5 registry""" @@ -262,7 +264,7 @@ def update_md5(filenames): match = re.search("\nmd5_data = {\n([^}]+)}", src) if not match: - print >>sys.stderr, "Internal error!" + print("Internal error!", file=sys.stderr) sys.exit(2) src = src[:match.start(1)] + repl + src[match.end(1):] diff --git a/maildiff.egg-info/PKG-INFO b/maildiff.egg-info/PKG-INFO deleted file mode 100644 index 4a5d321..0000000 --- a/maildiff.egg-info/PKG-INFO +++ /dev/null @@ -1,83 +0,0 @@ -Metadata-Version: 1.0 -Name: maildiff -Version: 1.1.2 -Summary: Package to email color git diff -Home-page: https://bitbucket.org/sanfx/git-maildiff -Author: Sanjeev Kumar -Author-email: skysan@gmail.com -License: LICENSE -Description: # Git maildiff - - - > **maildiff** is a simple git command to email diff in color to reviewer/ co-worker. - - ###Install - Navigate to git-maildiff directory you cloned or downlaoded from terminal - - run ***$ pip install .*** - where . refers to your current working directory i.e. inside git-maildiff - and you are good to go. - - ###Uninstall - pip uninstall maildiff - - ###Setup Config - - ***git config --global maildiff.mailto recipient@email.com*** - - ***git config --global maildiff.smtpserver smtp.gmail.com*** - - ***git config --global maildiff.smtpserverport 587*** - - ***git config --global maildiff.mailFrom sender@email.com*** - - ***git config --global maildiff.smtpencryption tls*** - e.g. Gmail uses tls encryption - - if you forget to run the above setup the git maildiff command will prompts each - one by one and update in .gitconfig the email password is stored in OS keychain. - - ###Usage - - **git maildiff** - Email the diff of commited or uncommited changes in colored to multiple recipients and allows attaching patches. - - **git maildiff -d 'HEAD^1'** - will email the diff. - - when no -diff or -d flag is passed with value the default value is **git diff HEAD^ HEAD** - - **git maildiff -to email@domain.com** - will email diff to this email address. - - **git maildiff -v** - use the -v flag to enable verbosity and display what command is run and what is the result of executed command. - - **type git maildiff -h** in shell for more help. - - ###Note - - If you are behind a proxy server, and you are having issues accessing git repository you can update gitconfig to add - proxy settings like - - git config --global http.proxy http://mydomain\\myusername:mypassword@myproxyserver:8080 - - ###Dependencies - - **argparse** - - **keyring** - - **logging** - - **colorlog** - - **colorama** (for windows only) - - - ######Type **git maildiff -h** for help in command line/ terminal - - ## Contact - - **Email:** - - **Website:** [www.devilsan.com](http://www.devilsan.com "click to got to website") - - [![Licence]( http://i.creativecommons.org/l/by-nc-sa/4.0/80x15.png )](https://raw.github.com/sanfx/git-maildiff/master/LICENSE) -Platform: UNKNOWN diff --git a/maildiff.egg-info/SOURCES.txt b/maildiff.egg-info/SOURCES.txt deleted file mode 100644 index 3186708..0000000 --- a/maildiff.egg-info/SOURCES.txt +++ /dev/null @@ -1,16 +0,0 @@ -LICENSE -MANIFEST.in -VERSION -setup.cfg -setup.py -emaildiff/__init__.py -emaildiff/maildiff_cmd.py -emaildiff/mail/__init__.py -emaildiff/mail/send.py -maildiff.egg-info/PKG-INFO -maildiff.egg-info/SOURCES.txt -maildiff.egg-info/dependency_links.txt -maildiff.egg-info/entry_points.txt -maildiff.egg-info/requires.txt -maildiff.egg-info/top_level.txt -scripts/git-maildiff \ No newline at end of file diff --git a/maildiff.egg-info/dependency_links.txt b/maildiff.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/maildiff.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/maildiff.egg-info/entry_points.txt b/maildiff.egg-info/entry_points.txt deleted file mode 100644 index 176889d..0000000 --- a/maildiff.egg-info/entry_points.txt +++ /dev/null @@ -1,3 +0,0 @@ -[console_scripts] -git-maildiff = emaildiff.maildiff_cmd:main - diff --git a/maildiff.egg-info/requires.txt b/maildiff.egg-info/requires.txt deleted file mode 100644 index e05a31a..0000000 --- a/maildiff.egg-info/requires.txt +++ /dev/null @@ -1,2 +0,0 @@ -keyring>=5.3 -colorlog>=2.6.0 \ No newline at end of file diff --git a/maildiff.egg-info/top_level.txt b/maildiff.egg-info/top_level.txt deleted file mode 100644 index 75be0ac..0000000 --- a/maildiff.egg-info/top_level.txt +++ /dev/null @@ -1,2 +0,0 @@ -emaildiff/mail -emaildiff