Skip to content

Instantly share code, notes, and snippets.

@ethankhall ethankhall/setup.py
Created Aug 11, 2016

Embed
What would you like to do?
Example setup.py for {py}gradle
from setuptools.dist import Distribution
import os
class GradleDistribution(Distribution, object):
"""The Python to Gradle bridge."""
#: The name of the requirements file generated by pygradle.
PINNED_TXT = 'pinned.txt'
def __init__(self, attrs):
attrs['name'] = os.getenv(self.PYGRADLE_PRODUCT_NAME)
attrs['version'] = os.getenv(self.PYGRADLE_PRODUCT_VERSION)
attrs['install_requires'] = list(self.load_requirements())
def load_requirements(self):
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.