Created
August 11, 2016 22:49
-
-
Save ethankhall/a7656670aed7fc6667fab0c79dce9d5c to your computer and use it in GitHub Desktop.
Example setup.py for {py}gradle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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