This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A library use for downgrade sources to python2 syntax during setup

Project Description

pydgutils (PYthon DownGrade UTILitieS)

Preface

This library use for compatilbe purpose.

It provided a simple method to preprocess sources to python2 syntax through 3to2 library (if using python2) and do nothing while using python3.

So that you could write your project in python3 syntax and install on python2 without any changes, all jobs are done by 3to2 module which we depends on.

Usage

Copy the pydgutils_bootstrap.py (in pydgutils source package) to the same directory of your setup.py, then modify your setup.py like this:

from pydgutils_bootstrap import use_pydgutils
use_pydgutils()

import pydgutils

# Convert source to v2.x if we are using python 2.x.
source_dir = pydgutils.process()

# Exclude the original source package, only accept the preprocessed package!
packages = find_packages(where=source_dir)

setup(
    ...
    package_dir = {"": source_dir},
    packages=packages,
    ...
    )

...

Changes

0.0.8 (2016-09-11)

  • Ensure only modified files be parsed while process the second time

0.0.7 (2016-08-26)

  • Enabled fixers : collections, memoryview, printfunction, unittest
  • Fixed lib3to2 don’t write back
  • Added helper functions : process_packages, process_requirements
Release History

Release History

This version
History Node

0.0.12

History Node

0.0.11

History Node

0.0.10

History Node

0.0.8

History Node

0.0.7

History Node

0.0.2

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pydgutils-0.0.12.tar.gz (6.7 kB) Copy SHA256 Checksum SHA256 Source Sep 14, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting