Skip to main content

pydgutils (PYthon DownGrade UTILitieS)

https://travis-ci.org/starofrainnight/pydgutils.svg?branch=master

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

Metadata

Release files for pydgutils 0.0.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydgutils 0.0.16
File Size Uploaded
pydgutils-0.0.16.tar.gz 7.3 kB Details

Release files / pydgutils-0.0.16.tar.gz

Download URL pydgutils-0.0.16.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
848ff0c1c0f8fd8560c28faa09fa6db0584294b756e484b85dc778a34b6a0dfe
BLAKE2b-256 checksum
How to use checksums
be7cbd8f75872060b823ab97efbfdfbef2a680c5bb2a8a6afe9da5750a12f163
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.16 This release

1 release file

0.0.15

1 release file

0.0.14

1 release file

0.0.13

1 release file

0.0.12

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page