<commit_before>import re
from utils import *

# Pronouncing dictionary class

IPA_VOWELS = "ɔɑiuɛɪʊʌəæeaoyʏøɝɚɒɜ"
IPA_VOWELENDINGS = IPA_VOWELS + "ː̯̩"
IPA_CONSONANTS = "pbtdkɡfvθðszʃʒhmnŋlrɾɹjwʔʍ"
IPA_STRESS = "ˈˌ"

class Nouncer(object):

    PHONEME_PATTERN = ("("
        "[{stress}]|"
        "[{vowel}][ː]?[ʊɪə]?[̯]?|"
        "(?:t͡?ʃ|d͡?ʒ|[{consonant}])[̩]?"
    ")[.ˑ ]?".format(stress=IPA_STRESS, vowel=IPA_VOWELS, consonant=IPA_CONSONANTS))

    ARPABET_TO_IPA = {
        'AO': 'ɔ', 'AA': 'ɑ', 'IY': 'i', 'UW': 'u', 'EH': 'ɛ', 'IH': 'ɪ', 'UH': 'ʊ', 'AH': 'ʌ', 'AX': 'ə', 'AE': 'æ',
        'EY': 'eɪ', 'AY': 'aɪ', 'OW': 'oʊ', 'AW': 'aʊ', 'OY': 'ɔɪ', 'ER': 'ɝ', 'AXR': 'ɚ',
        'P': 'p', 'B': 'b', 'T': 't', 'D': 'd', 'K': 'k', 'G': 'ɡ', 'CH': 't͡ʃ', 'JH': 'd͡ʒ', 'F': 'f', 'V': 'v',
        'TH': 'θ', 'DH': 'ð', 'S': 's', 'Z': 'z', 'SH': 'ʃ', 'ZH': 'ʒ', 'HH': 'h', 'M': 'm', 'EM': 'm̩',
        'N': 'n', 'EN': 'n̩', 'NG': 'ŋ', 'ENG': 'ŋ̍', 'L': 'l', 'EL': 'ɫ̩', 'R': 'r', 'DX': 'ɾ', 'NX': 'ɾ̃',
        'Y': 'j', 'W': 'w', 'Q': 'ʔ' }

    def __init__(self, filename=None, normalize=str.lower):
        self.pdict = CaseInsensitiveDict(normalize=normalize)
        if filename is not None:
            with open(filename, "r", encoding="utf-8") as f:
                for entry in f:
                    m = re.match("(.*)\t(.*)", entry)
                    if m:
                        self.pdict.setdefault(m.group(1), set()).add(tuple(m.group(2).split(" ")))

    def save(self, filename):
        """Save pronuncing dictionary to file."""
        with open(filename, 'w', encoding='utf-8') as f:
            for word in sorted(self.pdict.keys()):
                for pronunciation in self.pdict[word]:
                    print("{}\t{}".format(word, " ".join(pronunciation)), file=f)

    def import_cmudict(self, filename):
        """Import pronunciations from CMUDict."""
        with open(filename, "r", encoding="latin-1") as f:
            for entry in f:
                m = re.match("([^(]*)(?:[(][0-9][)])?  (.*)", entry)
                if m:
                    self.pdict.setdefault(m.group(1).lower(), set()).add(self.arpabet_to_phonemes(m.group(2)))

    def import_list(self, filename, delimiter="\t", ignore_errors=True):
        """Import pronunciations from a list file."""
        errors = []
        with open(filename, "r", encoding="utf-8") as f:
            for entry in f:
                m = re.match("(.*)[{}](.*)".format(delimiter), entry)
                if m:
                    try:
                        self.pdict.setdefault(m.group(1), set()).update(self.ipa_to_phonemes(m.group(2)))
                    except ValueError as e:
                        if not ignore_errors:
                            raise ValueError("Error reading {}: {}".format(m.group(1), str(e)))
                        errors.append((m.group(1), str(e)))
        return errors

    PHONEME_REGEX = re.compile(PHONEME_PATTERN)
    PRONUNCIATION_REGEX = re.compile("(?:{phoneme})*".format(phoneme=PHONEME_PATTERN))
    PARENTHESES_REGEX = re.compile("[(]([^)]+)[)]")
    BRACKETS_REGEX = re.compile("\[([^\]]+)\]")

    def ipa_to_phonemes(self, pronunciation):
        def normalise(string):
            return string.replace('ĭ','i').replace('̈','').replace('ᵻ','[ɪ,ə]').replace('ɨ','ɪ').replace('ɘ','ə').replace('ɵ','ʊ')
        def expand_parentheses(string):
            m = re.search(self.PARENTHESES_REGEX, string)
            if not m: return expand_brackets(string)
            else: return [x for s in (re.sub(self.PARENTHESES_REGEX, "", string, count=1), re.sub(self.PARENTHESES_REGEX, r"\1", string, count=1)) for x in expand_parentheses(s)]
        def expand_brackets(string):
            m = re.search(self.BRACKETS_REGEX, string)
            if not m: return [string]
            else: return [x for s in (re.sub(self.BRACKETS_REGEX, v, string, count=1) for v in m.group(1).split(",")) for x in expand_brackets(s)]
        pronunciations = expand_parentheses(normalise(pronunciation))
        return [self.ipa_to_phonemes_no_parentheses(p) for p in pronunciations]

    def ipa_to_phonemes_no_parentheses(self, pronunciation):
        m = re.match(self.PRONUNCIATION_REGEX, pronunciation)
        if m.end() < len(pronunciation):
            raise ValueError("Invalid pronunciation: /{}**{}/".format(pronunciation[:m.end()], pronunciation[m.end():]))
        phonemes, stress, vowels = [], "", 0
        for p in re.findall(self.PHONEME_REGEX, pronunciation):
            if p in IPA_STRESS:
                stress = p
            elif p[0] in IPA_VOWELS:
                phonemes.append(stress+p)
                stress = ""
                vowels += 1
            else:
                if p == "tʃ": p = "t͡?ʃ"
                elif p == "dʒ": p = "d͡?ʒ"
                phonemes.append(p)
        if vowels == 1:
            try: # autoadd stress mark for monosyllabic words
                i = next(i for i in range(len(phonemes)) if phonemes[i][0] in IPA_VOWELS)
                if phonemes[i] != 'ə':
                    phonemes[i] = 'ˈ' + phonemes[i]
            except StopIteration:
                pass
        return tuple(phonemes)

    def arpabet_to_phonemes(self, pronunciation):
        phonemes = []
        for l in pronunciation.split(" "):
            phoneme = ""
            if l == 'AH0': l = 'AX0' # distinguish ʌ from ə
            if l[-1] in ('0', '1', '2'):
                phoneme += { '0': '', '1': 'ˈ', '2': 'ˌ' }[l[-1]]
                l = l[:-1]
            phoneme += self.ARPABET_TO_IPA[l]
            phonemes.append(phoneme)
        return tuple(phonemes)

    @classmethod
    def _is_vowel(self, phoneme): return phoneme[-1] in IPA_VOWELENDINGS

    @classmethod
    def _is_stressed(self, phoneme, secondary=False): return phoneme[0] == 'ˈ' or secondary and phoneme[0] == 'ˌ'

    @classmethod
    def _is_consonant(self, phoneme): return phoneme[-1] not in IPA_VOWELENDINGS

    # API

    def __getitem__(self, word):
        """Return the pronunciations of a word in IPA. Syllable boundaries aren't marked and stress marks go before the stressed vowel."""
        return {"".join(pronunciation) for pronunciation in self.pdict[word]}

    def __setitem__(self, word, pronunciation):
        """Set a pronunciation of a word in IPA."""
        self.pdict.setdefault(word, set()).update(self.ipa_to_phonemes(pronunciation))

    def __delitem__(self, word):
        """Delete all pronunciations of a word."""
        del self.pdict[word]

    def syllables(self, word):
        """Number of syllables in a word."""
        return {"".join(pronunciation) : sum(1 for phoneme in pronunciation if self._is_vowel(phoneme)) for pronunciation in self.pdict[word]}

    @classmethod
    def _rhymeswith(self, phonemes1, phonemes2, identirhyme=False, enjambment=False, multirhyme=False):
        stress1 = first_or_default((i for i in range(len(phonemes1)) if self._is_stressed(phonemes1[i])), 0)
        stress2 = first_or_default((i for i in range(len(phonemes2)) if self._is_stressed(phonemes2[i])), 0)
        same_consonant = stress1==stress2==0 or stress1>0 and stress2>0 and phonemes1[stress1-1]==phonemes2[stress2-1]
        pattern1 = phonemes1[stress1:]
        pattern2 = phonemes2[stress2:len(phonemes1)-stress1+stress2 if enjambment else None]
        if multirhyme:
            def strip_consonants(p):
                lv = first_or_default((i for i in reversed(range(len(p))) if self._is_vowel(p[i])), 0)
                return [x for i,x in enumerate(p) if self._is_vowel(x) or i >= lv]
            pattern1 = strip_consonants(pattern1)
            pattern2 = strip_consonants(pattern2)
        return pattern1 == pattern2 and (not same_consonant or identirhyme)

    def rhymes(self, word, identirhyme=False, enjambment=False, multirhyme=False):
        """Rhymes for a word."""
        d = {}
        for p1 in self.pdict[word]:
            for w2, ps2 in self.pdict.items():
                for p2 in ps2:
                    if self._rhymeswith(p1, p2, identirhyme, enjambment, multirhyme):
                        d.setdefault("".join(p1), []).append(w2)
        return d

def wiktionary_to_csv(input, output, language="en", accents=("US", "USA", "GA", "GenAm", None)):
    """Extract IPA pronunciations from wiktionary xml dump."""
    title_regex = re.compile("<title>(.*)</title>")
    ipa_regex_1 = re.compile("{{{{IPA[|]/([^|]+)/[|]lang={lang}}}}}".format(lang=language))
    ipa_regex_2 = re.compile("{{{{IPA[|]lang={lang}[|]/([^|]+)/}}}}".format(lang=language))
    accent_regex = re.compile("{{{{a(ccent)?[|]([^}}]+[|])?({accents})[|}}]".format(accents="|".join(a for a in make_iterable(accents) if a)))
    any_accent_regex = re.compile("{{a(ccent)?[|]")
    match = ValueCache()
    with open(input, "r", encoding="utf-8") as i:
        with open(output, "w", encoding="utf-8") as o:
            for line in i:
                if match.set(re.search(title_regex, line)):
                    title = match.value.group(1)
                elif match.set(re.search(ipa_regex_1, line) or re.search(ipa_regex_2, line)):
                    if accents and not re.search(accent_regex, line) and (None not in accents or re.search(any_accent_regex, line)):
                        continue
                    elif ":" in title:
                        continue
                    for pronunciation in match.value.group(1).split(", "):
                        print("{}\t{}".format(title, pronunciation), file=o)

<commit_msg>[nounce] Maker Nouncer class a MutableMapping and add simple filter<commit_after>from collections import abc
import re

from utils import *

# Pronouncing dictionary class, largely targeted at English

IPA_VOWELS = "ɔɑiuɛɪʊʌəæeaoyʏøɝɚɒɜʁ"
IPA_VOWELENDINGS = IPA_VOWELS + "ː̯̩̃"
IPA_CONSONANTS = "pbtdkɡfvθðszʃʒhmnŋlrɾɹjwʔʍχ"
IPA_STRESS = "ˈˌ"

class Nouncer(abc.MutableMapping):

    PHONEME_PATTERN = ("("
        "[{stress}]|"
        "[{vowel}][ː̃]*[ʊɪə]?[̯]?|"
        "(?:t͡?ʃ|d͡?ʒ|[{consonant}])[̩]?"
    ")[.ˑ ]?".format(stress=IPA_STRESS, vowel=IPA_VOWELS, consonant=IPA_CONSONANTS))

    ARPABET_TO_IPA = {
        'AO': 'ɔ', 'AA': 'ɑ', 'IY': 'i', 'UW': 'u', 'EH': 'ɛ', 'IH': 'ɪ', 'UH': 'ʊ', 'AH': 'ʌ', 'AX': 'ə', 'AE': 'æ',
        'EY': 'eɪ', 'AY': 'aɪ', 'OW': 'oʊ', 'AW': 'aʊ', 'OY': 'ɔɪ', 'ER': 'ɝ', 'AXR': 'ɚ',
        'P': 'p', 'B': 'b', 'T': 't', 'D': 'd', 'K': 'k', 'G': 'ɡ', 'CH': 't͡ʃ', 'JH': 'd͡ʒ', 'F': 'f', 'V': 'v',
        'TH': 'θ', 'DH': 'ð', 'S': 's', 'Z': 'z', 'SH': 'ʃ', 'ZH': 'ʒ', 'HH': 'h', 'M': 'm', 'EM': 'm̩',
        'N': 'n', 'EN': 'n̩', 'NG': 'ŋ', 'ENG': 'ŋ̍', 'L': 'l', 'EL': 'ɫ̩', 'R': 'r', 'DX': 'ɾ', 'NX': 'ɾ̃',
        'Y': 'j', 'W': 'w', 'Q': 'ʔ' }

    def __init__(self, filename=None, normalize=str.lower):
        self.pdict = CaseInsensitiveDict(normalize=normalize)
        if filename is not None:
            with open(filename, "r", encoding="utf-8") as f:
                for entry in f:
                    m = re.match("(.*)\t(.*)", entry)
                    if m:
                        self.pdict.setdefault(m.group(1), set()).add(tuple(m.group(2).split(" ")))

    def save(self, filename):
        """Save pronuncing dictionary to file."""
        with open(filename, 'w', encoding='utf-8') as f:
            for word in sorted(self.pdict.keys()):
                for pronunciation in self.pdict[word]:
                    print("{}\t{}".format(word, " ".join(pronunciation)), file=f)

    def import_cmudict(self, filename):
        """Import pronunciations from CMUDict."""
        with open(filename, "r", encoding="latin-1") as f:
            for entry in f:
                m = re.match("([^(]*)(?:[(][0-9][)])?  (.*)", entry)
                if m:
                    self.pdict.setdefault(m.group(1).lower(), set()).add(self.arpabet_to_phonemes(m.group(2)))

    def import_list(self, filename, delimiter="\t", ignore_errors=True):
        """Import pronunciations from a list file."""
        errors = []
        with open(filename, "r", encoding="utf-8") as f:
            for entry in f:
                m = re.match("(.*)[{}](.*)".format(delimiter), entry)
                if m:
                    try:
                        self.pdict.setdefault(m.group(1), set()).update(self.ipa_to_phonemes(m.group(2)))
                    except ValueError as e:
                        if not ignore_errors:
                            raise ValueError("Error reading {}: {}".format(m.group(1), str(e)))
                        errors.append((m.group(1), str(e)))
        return errors

    PHONEME_REGEX = re.compile(PHONEME_PATTERN)
    PRONUNCIATION_REGEX = re.compile("(?:{phoneme})*".format(phoneme=PHONEME_PATTERN))
    PARENTHESES_REGEX = re.compile("[(]([^)]+)[)]")
    BRACKETS_REGEX = re.compile("\[([^\]]+)\]")

    def ipa_to_phonemes(self, pronunciation):
        def normalise(string):
            string = re.sub("(?<=.)-(?=.)", "", string)
            return (string.replace('ĭ','i').replace('̈','').replace('ᵻ','[ɪ,ə]')
                          .replace('ɨ','ɪ').replace('ɘ','ə').replace('ɵ','ʊ')
                          .replace('ɱ','m'))
        def expand_parentheses(string):
            m = re.search(self.PARENTHESES_REGEX, string)
            if not m: return expand_brackets(string)
            else: return [x for s in (re.sub(self.PARENTHESES_REGEX, "", string, count=1), re.sub(self.PARENTHESES_REGEX, r"\1", string, count=1)) for x in expand_parentheses(s)]
        def expand_brackets(string):
            m = re.search(self.BRACKETS_REGEX, string)
            if not m: return [string]
            else: return [x for s in (re.sub(self.BRACKETS_REGEX, v, string, count=1) for v in m.group(1).split(",")) for x in expand_brackets(s)]
        pronunciations = expand_parentheses(normalise(pronunciation))
        return [self.ipa_to_phonemes_no_parentheses(p) for p in pronunciations]

    def ipa_to_phonemes_no_parentheses(self, pronunciation):
        m = re.match(self.PRONUNCIATION_REGEX, pronunciation)
        if m.end() < len(pronunciation):
            raise ValueError("Invalid pronunciation: /{}**{}/".format(pronunciation[:m.end()], pronunciation[m.end():]))
        phonemes, stress, vowels = [], "", 0
        for p in re.findall(self.PHONEME_REGEX, pronunciation):
            if p in IPA_STRESS:
                stress = p
            elif p[0] in IPA_VOWELS:
                phonemes.append(stress+p)
                stress = ""
                vowels += 1
            else:
                if p == "tʃ": p = "t͡?ʃ"
                elif p == "dʒ": p = "d͡?ʒ"
                phonemes.append(p)
        if vowels == 1:
            try: # autoadd stress mark for monosyllabic words
                i = next(i for i in range(len(phonemes)) if phonemes[i][0] in IPA_VOWELS)
                if phonemes[i] != 'ə':
                    phonemes[i] = 'ˈ' + phonemes[i]
            except StopIteration:
                pass
        return tuple(phonemes)

    def arpabet_to_phonemes(self, pronunciation):
        phonemes = []
        for l in pronunciation.split(" "):
            phoneme = ""
            if l == 'AH0': l = 'AX0' # distinguish ʌ from ə
            if l[-1] in ('0', '1', '2'):
                phoneme += { '0': '', '1': 'ˈ', '2': 'ˌ' }[l[-1]]
                l = l[:-1]
            phoneme += self.ARPABET_TO_IPA[l]
            phonemes.append(phoneme)
        return tuple(phonemes)

    @classmethod
    def _is_vowel(self, phoneme): return phoneme[-1] in IPA_VOWELENDINGS

    @classmethod
    def _is_stressed(self, phoneme, secondary=False): return phoneme[0] == 'ˈ' or secondary and phoneme[0] == 'ˌ'

    @classmethod
    def _is_consonant(self, phoneme): return phoneme[-1] not in IPA_VOWELENDINGS

    # MutableMapping

    def __getitem__(self, word):
        """Return the pronunciations of a word in IPA. Syllable boundaries aren't marked and stress marks go before the stressed vowel."""
        return {"".join(pronunciation) for pronunciation in self.pdict[word]}

    def __setitem__(self, word, pronunciations):
        """Set pronunciations of a word in IPA. If a single pronunciation is given then it is appended to existing ones."""
        if non_string_iterable(pronunciations):
            self.pdict[word] = { q for p in pronunciations for q in self.ipa_to_phonemes(p) }
        else:
            self.pdict.setdefault(word, set()).update(self.ipa_to_phonemes(pronunciations))

    def __delitem__(self, word):
        """Delete all pronunciations of a word."""
        del self.pdict[word]

    def __iter__(self):
        return iter(self.pdict)

    def __len__(self):
        return len(self.pdict)

    def __repr__(self):
        return "<Nouncer: {} entries>".format(len(self))

    # rest of API

    def syllables(self, word):
        """Number of syllables in a word."""
        return {"".join(pronunciation) : sum(1 for phoneme in pronunciation if self._is_vowel(phoneme)) for pronunciation in self.pdict[word]}

    def pronunciations(self, word_filter=None, pronunciation_filter=None):
        """Generator returning matching pronunciations."""
        def match(pattern, string):
            return pattern is None or callable(pattern) and pattern(string) or re.search(pattern, string)
        return ((w, p) for w,ps in self.items() if match(word_filter,w) for p in ps if match(pronunciation_filter, p))

    @classmethod
    def _rhymeswith(self, phonemes1, phonemes2, identirhyme=False, enjambment=False, multirhyme=False):
        stress1 = first_or_default((i for i in range(len(phonemes1)) if self._is_stressed(phonemes1[i])), 0)
        stress2 = first_or_default((i for i in range(len(phonemes2)) if self._is_stressed(phonemes2[i])), 0)
        same_consonant = stress1==stress2==0 or stress1>0 and stress2>0 and phonemes1[stress1-1]==phonemes2[stress2-1]
        pattern1 = phonemes1[stress1:]
        pattern2 = phonemes2[stress2:len(phonemes1)-stress1+stress2 if enjambment else None]
        if multirhyme:
            def strip_consonants(p):
                lv = first_or_default((i for i in reversed(range(len(p))) if self._is_vowel(p[i])), 0)
                return [x for i,x in enumerate(p) if self._is_vowel(x) or i >= lv]
            pattern1 = strip_consonants(pattern1)
            pattern2 = strip_consonants(pattern2)
        return pattern1 == pattern2 and (not same_consonant or identirhyme)

    def rhymes(self, word, identirhyme=False, enjambment=False, multirhyme=False):
        """Rhymes for a word."""
        d = {}
        for p1 in self.pdict[word]:
            for w2, ps2 in self.pdict.items():
                for p2 in ps2:
                    if self._rhymeswith(p1, p2, identirhyme, enjambment, multirhyme):
                        d.setdefault("".join(p1), []).append(w2)
        return d

def wiktionary_to_csv(input, output, language="en", accents=("US", "USA", "GA", "GenAm", None)):
    """Extract IPA pronunciations from wiktionary xml dump."""
    title_regex = re.compile("<title>(.*)</title>")
    ipa_regex_1 = re.compile("{{{{IPA[|]/([^|]+)/[|]lang={lang}}}}}".format(lang=language))
    ipa_regex_2 = re.compile("{{{{IPA[|]lang={lang}[|]/([^|]+)/}}}}".format(lang=language))
    accent_regex = re.compile("{{{{a(ccent)?[|]([^}}]+[|])?({accents})[|}}]".format(accents="|".join(a for a in make_iterable(accents) if a)))
    any_accent_regex = re.compile("{{a(ccent)?[|]")
    match = ValueCache()
    with open(input, "r", encoding="utf-8") as i:
        with open(output, "w", encoding="utf-8") as o:
            for line in i:
                if match.set(re.search(title_regex, line)):
                    title = match.value.group(1)
                elif match.set(re.search(ipa_regex_1, line) or re.search(ipa_regex_2, line)):
                    if accents and not re.search(accent_regex, line) and (None not in accents or re.search(any_accent_regex, line)):
                        continue
                    elif ":" in title:
                        continue
                    for pronunciation in match.value.group(1).split(", "):
                        print("{}\t{}".format(title, pronunciation), file=o)

<|endoftext|>


<commit_before>import os

from distutils.core import setup

VERSION = '0.1.0'

README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()

required = [
    'Django >= 1.5.0',
]

setup(
    name='madmin',
    version=VERSION,
    description="Virtual mail administration django app",
    author="Lewis Gunsch",
    author_email="lewis@gunsch.ca",
    url="https://github.com/lgunsch/madmin",
    license='MIT',
    long_description=README,
    packages=[
        'madmin',
        'madmin.management',
        'madmin.management.commands',
        'madmin.migrations',
        'madmin.tests',
    ],
    scripts=[],
    install_requires=required,
)
<commit_msg>Keep the fixtures in, and add some classifiers to the setup.py.<commit_after>import os

from distutils.core import setup

VERSION = '0.1.0'

README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()

required = [
    'Django >= 1.5.0',
]

setup(
    name='madmin',
    version=VERSION,
    description="Virtual mail administration django app",
    author="Lewis Gunsch",
    author_email="lewis@gunsch.ca",
    url="https://github.com/lgunsch/madmin",
    license='MIT',
    long_description=README,
    packages=[
        'madmin',
        'madmin.management',
        'madmin.management.commands',
        'madmin.migrations',
        'madmin.tests',
    ],
    scripts=[],
    install_requires=required,
    include_package_data=True,
    classifiers=[
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Topic :: Communications :: Email',
        'Topic :: Communications :: Email :: Mail Transport Agents',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
    ],
)
<|endoftext|>


<commit_before>from setuptools import setup, find_packages
import versioneer

# read the contents of your README file
with open('README.md') as f:
    long_description = f.read()

setup(
    name='rna_tools',
    version=versioneer.get_version(),
    cmdclass=versioneer.get_cmdclass(),
    packages=find_packages(),
    test_suite="tests",
    url='https://github.com/mmagnus/rna-tools',
    scripts=['rna_tools/rna_pdb_toolsx.py',
             'rna_tools/rna_calc_fenergy.py',

             'rna_tools/tools/misc/rna_tools_which.py',
             'rna_tools/tools/rna_calc_rmsd/rna_calc_rmsd.py',
             'rna_tools/tools/rna_calc_rmsd/rna_calc_rmsd_all_vs_all.py',
             'rna_tools/tools/rna_calc_rmsd/rna_calc_rmsd_biopython.py',

             'rna_tools/tools/diffpdb/diffpdb.py',
             'rna_tools/tools/clanstix/rna_clanstix.py',
             'rna_tools/rna_dot2ct.py',
             'rna_tools/rna_secondary_structure_prediction.py',
             'rna_tools/tools/rna_prediction_significance/rna_prediction_significance.py',
             'rna_tools/tools/rna_multimodels/rna_pdb_merge_into_one.py',
             'rna_tools/tools/rna_calc_inf/rna_calc_inf.py',
             'rna_tools/tools/rna_convert_pseudoknot_formats/rna_pk_simrna_to_one_line.py',
             'rna_tools/tools/clarna_app/clarna_app.py',
             'rna_tools/tools/rna_helix_vis/rna_helix_vis.py',
             'rna_tools/tools/misc/rna_add_chain.py',
             'rna_tools/tools/rna_sali2dotbracket/rna_sali2dotbracket.py',

             'rna_tools/tools/rna_rosetta/rna_rosetta_run.py',
             'rna_tools/tools/rna_rosetta/rna_rosetta_cluster.py',
             'rna_tools/tools/rna_rosetta/rna_rosetta_min.py',
             'rna_tools/tools/rna_rosetta/rna_rosetta_n.py',
             'rna_tools/tools/rna_rosetta/rna_rosetta_extract_lowscore_decoys.py',
             'rna_tools/tools/rna_rosetta/rna_rosetta_check_progress.py',
             'rna_tools/tools/rna_rosetta/rna_rosetta_head.py',

             'rna_tools/tools/simrna_trajectory/rna_simrna_lowest.py',
             'rna_tools/tools/simrna_trajectory/rna_simrna_extract.py',
             'rna_tools/tools/simrna_trajectory/rna_simrna_cluster.py',

             'rna_tools/tools/plotting/rna_plot_hist.py',
             'rna_tools/tools/plotting/rna_plot_density.py',
             'rna_tools/tools/plotting/rna_plot_heatmap.py',
             'rna_tools/tools/plotting/rna_plot_dendogram.py',

             'rna_tools/tools/simrna_trajectory/rna_simrna_lowest.py',
             'rna_tools/tools/simrna_trajectory/rna_simrna_extract.py',
             'rna_tools/tools/simrna_trajectory/rna_simrna_cluster.py',

             'rna_tools/tools/rna_filter/rna_filter.py',
             'rna_tools/tools/rna_filter/rna_ec2x.py',
             'rna_tools/tools/rna_filter/rna_pairs2SimRNArestrs.py',
             'rna_tools/tools/rna_filter/rna_ss_get_bps.py',
             'rna_tools/tools/rna_filter/rna_pairs_diff.py',

             'rna_tools/tools/rna_alignment/rna_align_seq_to_alignment.py',
             'rna_tools/tools/rna_alignment/rna_align_find_core.py',
             'rna_tools/tools/rna_alignment/rna_align_get_ss_from_stk.py',
             'rna_tools/tools/rna_alignment/rna_align_seq_to_alignment.py',
             'rna_tools/tools/rna_alignment/utils/rna_alignment_get_species.py',
             'rna_tools/tools/rna_alignment/utils/rna_alignment_process_id.py',
             'rna_tools/tools/rna_alignment/utils/rna_alignment_r2r.py',
             'rna_tools/tools/rna_alignment/rna_align_find_seq_in_alignment.py',
             'rna_tools/tools/rna_alignment/rna_align_foldability.py',
             'rna_tools/tools/rna_pdb_edit_occupancy_bfactor/rna_pdb_edit_occupancy_bfactor.py',
             'rna_tools/tools/rna_refinement/rna_refinement.py',
             'rna_tools/rna_simrnaweb_download_job.py',
             'rna_tools/tools/rna_calc_evo_rmsd/rna_calc_evo_rmsd.py',
             'rna_tools/tools/rna_calc_rmsd/rna_calc_rmsd_multi_targets.py',
             'rna_tools/tools/rna_calc_rmsd_trafl/rna_calc_rmsd_trafl.py',
             'rna_tools/tools/rna_calc_rmsd_trafl/rna_cal_rmsd_trafl_plot.py',
             'rna_tools/tools/rna_x3dna/rna_x3dna.py',
             'rna_tools/tools/renum_pdb_to_aln/renum_pdb_to_aln.py',
             'rna_tools/tools/pdbs_measure_atom_dists/pdbs_measure_atom_dists.py',
             'rna_tools/tools/rna_alignment/random_assignment_of_nucleotides.py',
             'rna_tools/tools/rna_seq_search_BLASTn_outfmt-6/select_seq_fromBLAStn_6outfm.py',
             'rna_tools/tools/pefx/pefx.py',
             'rna_tools/tools/misc/translate.py',
             'rna_tools/tools/misc/reverse.py',
             'rna_tools/tools/misc/reverse.py',
             'rna_tools/tools/rna_alignment/utils/rna_align_strip_stk.py',
             'rna_tools/tools/pymol_color_by_conserv/pymol_color_by_conserv.py',
             'rna_tools/tools/pymol_preview_generator/pymol_preview_generator.py',
             'rna_tools/tools/pymol_preview_generator/pymol_preview_install.py',

             'rna_tools/tools/rna_binding_affinity/rna_dG2kd.py',
             'rna_tools/tools/rna_binding_affinity/rna_dG2kd.py',
             'rna_tools/tools/rna_binding_affinity/rna_kd2dG.py',
             'rna_tools/tools/rna_binding_affinity/rna_kd2pkd.py',
             'rna_tools/tools/rna_binding_affinity/rna_pkd2dG.py',
             'rna_tools/tools/rna_binding_affinity/rna_pkd2kd.py',

             'rna_tools/tools/clarna_play/rna_clarna_compare.py',
             'rna_tools/tools/clarna_play/rna_clarna_run.py',
             'rna_tools/tools/clarna_play/ClaRNAlib/clarna.py',

             'rna_tools/tools/mq/rna_mq_predict.py',
             'rna_tools/tools/mq/rna_mq_collect.py',
             'rna_tools/tools/mq/rna_mq_exp.py',
             'rna_tools/tools/mq/rna_mq_plot.py',

             'rna_tools/tools/mq/RNA3DCNN/rna_mq_rna3dcnn.py',
             'rna_tools/tools/mq/Dfire/rna_mq_dfire.py',
             'rna_tools/tools/mq/ClashScore/rna_mq_clashscore.py',
             'rna_tools/tools/mq/RNAkb/rna_mq_rnakb.py',
             'rna_tools/tools/mq/rsRNASP/rna_mq_rsRNASP.py',
             'rna_tools/tools/mq/FARNA/rna_mq_farna.py',
             'rna_tools/tools/mq/FARFAR2/rna_mq_farfar2.py',
             'rna_tools/tools/mq/SimRNA/rna_mq_simrna.py',
             'rna_tools/tools/mq/mqaprna_dev_remote.sh',
             'rna_tools/tools/mq/rna_mqapscore.py',

             'rna_tools/tools/md/rna_gromacs_ready.py',
             'rna_tools/tools/md/rna_openmm_short_simulation.py',

             'rna_tools/tools/triplexibility/triplexibility.py',

             'rna_tools/tools/misc/rna_merge_dfs.py',
             'rna_tools/tools/PyMOL4RNA/rna_draw_edges.py',

             'rna_tools/tools/rna_calc_hbonds/rna_calc_hbonds.py',
             ],

    license='GPLv3',
    author='Marcin Magnus',
    author_email='mag_dex@o2.pl',
    description='a toolbox to analyze structures and simulations of RNA',
    long_description=long_description,
    long_description_content_type="text/markdown",
    include_package_data=True,
    install_requires=[
        'numpy',
        'biopython',
        'progressbar2',
        # keep pip minimal
        #'sphinx==1.6.7',
        #'sphinx-argparse==0.1.15',
        #'sphinx-rtd-theme',
        #'sphinxcontrib-napoleon',
        #'forgi',
        'urllib3',
        #'pandas',
        #'matplotlib',
        #'scipy',
        #'python-Levenshtein',
        'versioneer',
        'configparser',
      ],
)

<commit_msg>mq: fix setup<commit_after>from setuptools import setup, find_packages
import versioneer

# read the contents of your README file
with open('README.md') as f:
    long_description = f.read()

setup(
    name='rna_tools',
    version=versioneer.get_version(),
    cmdclass=versioneer.get_cmdclass(),
    packages=find_packages(),
    test_suite="tests",
    url='https://github.com/mmagnus/rna-tools',
    scripts=['rna_tools/rna_pdb_toolsx.py',
             'rna_tools/rna_calc_fenergy.py',

             'rna_tools/tools/misc/rna_tools_which.py',
             'rna_tools/tools/rna_calc_rmsd/rna_calc_rmsd.py',
             'rna_tools/tools/rna_calc_rmsd/rna_calc_rmsd_all_vs_all.py',
             'rna_tools/tools/rna_calc_rmsd/rna_calc_rmsd_biopython.py',

             'rna_tools/tools/diffpdb/diffpdb.py',
             'rna_tools/tools/clanstix/rna_clanstix.py',
             'rna_tools/rna_dot2ct.py',
             'rna_tools/rna_secondary_structure_prediction.py',
             'rna_tools/tools/rna_prediction_significance/rna_prediction_significance.py',
             'rna_tools/tools/rna_multimodels/rna_pdb_merge_into_one.py',
             'rna_tools/tools/rna_calc_inf/rna_calc_inf.py',
             'rna_tools/tools/rna_convert_pseudoknot_formats/rna_pk_simrna_to_one_line.py',
             'rna_tools/tools/clarna_app/clarna_app.py',
             'rna_tools/tools/rna_helix_vis/rna_helix_vis.py',
             'rna_tools/tools/misc/rna_add_chain.py',
             'rna_tools/tools/rna_sali2dotbracket/rna_sali2dotbracket.py',

             'rna_tools/tools/rna_rosetta/rna_rosetta_run.py',
             'rna_tools/tools/rna_rosetta/rna_rosetta_cluster.py',
             'rna_tools/tools/rna_rosetta/rna_rosetta_min.py',
             'rna_tools/tools/rna_rosetta/rna_rosetta_n.py',
             'rna_tools/tools/rna_rosetta/rna_rosetta_extract_lowscore_decoys.py',
             'rna_tools/tools/rna_rosetta/rna_rosetta_check_progress.py',
             'rna_tools/tools/rna_rosetta/rna_rosetta_head.py',

             'rna_tools/tools/simrna_trajectory/rna_simrna_lowest.py',
             'rna_tools/tools/simrna_trajectory/rna_simrna_extract.py',
             'rna_tools/tools/simrna_trajectory/rna_simrna_cluster.py',

             'rna_tools/tools/plotting/rna_plot_hist.py',
             'rna_tools/tools/plotting/rna_plot_density.py',
             'rna_tools/tools/plotting/rna_plot_heatmap.py',
             'rna_tools/tools/plotting/rna_plot_dendogram.py',

             'rna_tools/tools/simrna_trajectory/rna_simrna_lowest.py',
             'rna_tools/tools/simrna_trajectory/rna_simrna_extract.py',
             'rna_tools/tools/simrna_trajectory/rna_simrna_cluster.py',

             'rna_tools/tools/rna_filter/rna_filter.py',
             'rna_tools/tools/rna_filter/rna_ec2x.py',
             'rna_tools/tools/rna_filter/rna_pairs2SimRNArestrs.py',
             'rna_tools/tools/rna_filter/rna_ss_get_bps.py',
             'rna_tools/tools/rna_filter/rna_pairs_diff.py',

             'rna_tools/tools/rna_alignment/rna_align_seq_to_alignment.py',
             'rna_tools/tools/rna_alignment/rna_align_find_core.py',
             'rna_tools/tools/rna_alignment/rna_align_get_ss_from_stk.py',
             'rna_tools/tools/rna_alignment/rna_align_seq_to_alignment.py',
             'rna_tools/tools/rna_alignment/utils/rna_alignment_get_species.py',
             'rna_tools/tools/rna_alignment/utils/rna_alignment_process_id.py',
             'rna_tools/tools/rna_alignment/utils/rna_alignment_r2r.py',
             'rna_tools/tools/rna_alignment/rna_align_find_seq_in_alignment.py',
             'rna_tools/tools/rna_alignment/rna_align_foldability.py',
             'rna_tools/tools/rna_pdb_edit_occupancy_bfactor/rna_pdb_edit_occupancy_bfactor.py',
             'rna_tools/tools/rna_refinement/rna_refinement.py',
             'rna_tools/rna_simrnaweb_download_job.py',
             'rna_tools/tools/rna_calc_evo_rmsd/rna_calc_evo_rmsd.py',
             'rna_tools/tools/rna_calc_rmsd/rna_calc_rmsd_multi_targets.py',
             'rna_tools/tools/rna_calc_rmsd_trafl/rna_calc_rmsd_trafl.py',
             'rna_tools/tools/rna_calc_rmsd_trafl/rna_cal_rmsd_trafl_plot.py',
             'rna_tools/tools/rna_x3dna/rna_x3dna.py',
             'rna_tools/tools/renum_pdb_to_aln/renum_pdb_to_aln.py',
             'rna_tools/tools/pdbs_measure_atom_dists/pdbs_measure_atom_dists.py',
             'rna_tools/tools/rna_alignment/random_assignment_of_nucleotides.py',
             'rna_tools/tools/rna_seq_search_BLASTn_outfmt-6/select_seq_fromBLAStn_6outfm.py',
             'rna_tools/tools/pefx/pefx.py',
             'rna_tools/tools/misc/translate.py',
             'rna_tools/tools/misc/reverse.py',
             'rna_tools/tools/misc/reverse.py',
             'rna_tools/tools/rna_alignment/utils/rna_align_strip_stk.py',
             'rna_tools/tools/pymol_color_by_conserv/pymol_color_by_conserv.py',
             'rna_tools/tools/pymol_preview_generator/pymol_preview_generator.py',
             'rna_tools/tools/pymol_preview_generator/pymol_preview_install.py',

             'rna_tools/tools/rna_binding_affinity/rna_dG2kd.py',
             'rna_tools/tools/rna_binding_affinity/rna_dG2kd.py',
             'rna_tools/tools/rna_binding_affinity/rna_kd2dG.py',
             'rna_tools/tools/rna_binding_affinity/rna_kd2pkd.py',
             'rna_tools/tools/rna_binding_affinity/rna_pkd2dG.py',
             'rna_tools/tools/rna_binding_affinity/rna_pkd2kd.py',

             'rna_tools/tools/clarna_play/rna_clarna_compare.py',
             'rna_tools/tools/clarna_play/rna_clarna_run.py',
             'rna_tools/tools/clarna_play/ClaRNAlib/clarna.py',

             'rna_tools/tools/mq/rna_mq_predict.py',
             'rna_tools/tools/mq/rna_mq_collect.py',
             'rna_tools/tools/mq/rna_mq_exp.py',
             'rna_tools/tools/mq/rna_mq_plot.py',

             'rna_tools/tools/mq/RNA3DCNN/rna_mq_rna3dcnn.py',
             'rna_tools/tools/mq/Dfire/rna_mq_dfire.py',
             'rna_tools/tools/mq/ClashScore/rna_mq_clashscore.py',
             'rna_tools/tools/mq/RNAkb/rna_mq_rnakb.py',
             'rna_tools/tools/mq/rsRNASP/rna_mq_rsRNASP.py',
             'rna_tools/tools/mq/FARNA/rna_mq_farna.py',
             'rna_tools/tools/mq/FARFAR2/rna_mq_farfar2.py',
             'rna_tools/tools/mq/SimRNA/rna_mq_simrna.py',
             'rna_tools/tools/mq/mqaprna_dev_remote.sh',

             'rna_tools/tools/md/rna_gromacs_ready.py',
             'rna_tools/tools/md/rna_openmm_short_simulation.py',

             'rna_tools/tools/triplexibility/triplexibility.py',

             'rna_tools/tools/misc/rna_merge_dfs.py',
             'rna_tools/tools/PyMOL4RNA/rna_draw_edges.py',

             'rna_tools/tools/rna_calc_hbonds/rna_calc_hbonds.py',
             ],

    license='GPLv3',
    author='Marcin Magnus',
    author_email='mag_dex@o2.pl',
    description='a toolbox to analyze structures and simulations of RNA',
    long_description=long_description,
    long_description_content_type="text/markdown",
    include_package_data=True,
    install_requires=[
        'numpy',
        'biopython',
        'progressbar2',
        # keep pip minimal
        #'sphinx==1.6.7',
        #'sphinx-argparse==0.1.15',
        #'sphinx-rtd-theme',
        #'sphinxcontrib-napoleon',
        #'forgi',
        'urllib3',
        #'pandas',
        #'matplotlib',
        #'scipy',
        #'python-Levenshtein',
        'versioneer',
        'configparser',
      ],
)

<|endoftext|>


<commit_before>from setuptools import setup, find_packages

setup(name='pynucastro',
      version='1.0',
      description='Python Interfaces to the nuclear reaction rate databases',
      url='https://github.com/pynucastro/nucastro',
      author='Mike Zingale and Donald Willcox',
      author_email='michael.zingale@stonybrook.edu',
      license='BSD',
      packages=find_packages(),
      install_requires=['networkx', 'numpy',
                        'sympy', 'scipy', 'matplotlib',
                        'ipywidgets'],
      zip_safe=False)
<commit_msg>also add the data files<commit_after>from setuptools import setup, find_packages

setup(name='pynucastro',
      version='1.0',
      description='Python Interfaces to the nuclear reaction rate databases',
      url='https://github.com/pynucastro/nucastro',
      author='Mike Zingale and Donald Willcox',
      author_email='michael.zingale@stonybrook.edu',
      license='BSD',
      packages=find_packages(),
      package_data={"pynucastro": ["library/*", "library/tabular/*"]},
      install_requires=['networkx', 'numpy',
                        'sympy', 'scipy', 'matplotlib',
                        'ipywidgets'],
      zip_safe=False)
<|endoftext|>


<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
# file: $Id$
# auth: Philip J Grabner <grabner@cadit.com>
# date: 2013/07/03
# copy: (C) Copyright 2013 Cadit Inc., see LICENSE.txt
#------------------------------------------------------------------------------

import os, sys, re
from setuptools import setup, find_packages

# require python 2.7+
assert(sys.version_info[0] > 2
       or sys.version_info[0] == 2
       and sys.version_info[1] >= 7)

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.rst')).read()

test_requires = [
  'nose                 >= 1.2.1',
  'coverage             >= 3.5.3',
  ]

requires = [
  'TemplateAlchemy      >= 0.1.14',
  'cssutils             >= 0.9.10b1',
  'cssselect            >= 0.7.1',
  'py-dom-xpath         >= 0.1',
  'html2text            >= 3.200.3',
  'dkimpy               >= 0.5.4',
  'dnspython            >= 1.11.0',
  ]

entrypoints = {
  'console_scripts': [
    'genemail           = genemail.cli:main',
    ],
  }

setup(
  name                  = 'genemail',
  version               = '0.1.3',
  description           = 'A templated email generation library',
  long_description      = README,
  classifiers           = [
    'Development Status :: 4 - Beta',
    'Intended Audience :: Developers',
    'Programming Language :: Python',
    'Operating System :: OS Independent',
    'Topic :: Software Development',
    'Natural Language :: English',
    'License :: OSI Approved :: MIT License',
    'License :: Public Domain',
    ],
  author                = 'Philip J Grabner, Cadit Health Inc',
  author_email          = 'oss@cadit.com',
  url                   = 'http://github.com/cadithealth/genemail',
  keywords              = 'template email generation html text smtp',
  packages              = find_packages(),
  namespace_packages    = ['genemail'],
  include_package_data  = True,
  zip_safe              = True,
  install_requires      = requires,
  tests_require         = test_requires,
  test_suite            = 'genemail',
  entry_points          = entrypoints,
  license               = 'MIT (http://opensource.org/licenses/MIT)',
  )

#------------------------------------------------------------------------------
# end of $Id$
#------------------------------------------------------------------------------
<commit_msg>removed unnecessary requirement on dnspython<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
# file: $Id$
# auth: Philip J Grabner <grabner@cadit.com>
# date: 2013/07/03
# copy: (C) Copyright 2013 Cadit Inc., see LICENSE.txt
#------------------------------------------------------------------------------

import os, sys, re
from setuptools import setup, find_packages

# require python 2.7+
assert(sys.version_info[0] > 2
       or sys.version_info[0] == 2
       and sys.version_info[1] >= 7)

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.rst')).read()

test_requires = [
  'nose                 == 1.3.0',
  'coverage             >= 3.5.3',
  ]

requires = [
  'TemplateAlchemy      >= 0.1.15',
  'cssutils             >= 0.9.10b1',
  'cssselect            >= 0.7.1',
  'py-dom-xpath         >= 0.1',
  'html2text            >= 3.200.3',
  'dkimpy               >= 0.5.4',
  ]

entrypoints = {
  'console_scripts': [
    'genemail           = genemail.cli:main',
    ],
  }

setup(
  name                  = 'genemail',
  version               = '0.1.4',
  description           = 'A templated email generation library',
  long_description      = README,
  classifiers           = [
    'Development Status :: 4 - Beta',
    'Intended Audience :: Developers',
    'Programming Language :: Python',
    'Operating System :: OS Independent',
    'Topic :: Software Development',
    'Natural Language :: English',
    'License :: OSI Approved :: MIT License',
    'License :: Public Domain',
    ],
  author                = 'Philip J Grabner, Cadit Health Inc',
  author_email          = 'oss@cadit.com',
  url                   = 'http://github.com/cadithealth/genemail',
  keywords              = 'template email generation html text smtp',
  packages              = find_packages(),
  namespace_packages    = ['genemail'],
  include_package_data  = True,
  zip_safe              = True,
  install_requires      = requires,
  tests_require         = test_requires,
  test_suite            = 'genemail',
  entry_points          = entrypoints,
  license               = 'MIT (http://opensource.org/licenses/MIT)',
  )

#------------------------------------------------------------------------------
# end of $Id$
#------------------------------------------------------------------------------
<|endoftext|>


<commit_before>#
#    ICRAR - International Centre for Radio Astronomy Research
#    (c) UWA - The University of Western Australia, 2016
#    Copyright by UWA (in the framework of the ICRAR)
#    All rights reserved
#
#    This library is free software; you can redistribute it and/or
#    modify it under the terms of the GNU Lesser General Public
#    License as published by the Free Software Foundation; either
#    version 2.1 of the License, or (at your option) any later version.
#
#    This library is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#    Lesser General Public License for more details.
#
#    You should have received a copy of the GNU Lesser General Public
#    License along with this library; if not, write to the Free Software
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
#    MA 02111-1307  USA
#

import os
import subprocess
import sys
import sysconfig

from setuptools import find_packages
from setuptools import setup
from setuptools.command.install import install

# Version information
# We do like numpy: we have a major/minor/patch hand-written version written
# here. If we find the git commit (either via "git" command execution or in a
# dlg/version.py file) we append it to the VERSION later.
# The RELEASE flag allows us to create development versions properly supported
# by setuptools/pkg_resources or "final" versions.
MAJOR   = 0
MINOR   = 6
PATCH   = 0
RELEASE = True
VERSION = '%d.%d.%d' % (MAJOR, MINOR, PATCH)
VERSION_FILE = 'dlg/version.py'
PTH_FILE = 'lib64_dist.pth'

def get_git_version():
    out = subprocess.check_output(['git', 'rev-parse', 'HEAD'])
    return out.strip().decode('ascii')

def get_version_info():
    git_version = 'Unknown'
    if os.path.exists('.git'):
        git_version = get_git_version()
    full_version = VERSION
    if not RELEASE:
        full_version = '%s.dev0+%s' % (VERSION, git_version[:7])
    return full_version, git_version

def write_version_info():
    tpl = """
# THIS FILE IS GENERATED BY DALIUGE'S SETUP.PY
# DO NOT MODIFY BY HAND
version = '%(version)s'
git_version = '%(git_version)s'
full_version = '%(full_version)s'
is_release = %(is_release)s

if not is_release:
    version = full_version
"""
    full_version, git_version = get_version_info()
    with open(VERSION_FILE, 'w') as f:
        info = tpl % {'version': VERSION,
                      'full_version': full_version,
                      'git_version': git_version,
                      'is_release': RELEASE}
        f.write(info.strip())

# Every time we overwrite the version file
write_version_info()

# HACK - HACK - HACK - HACK
class lib64_path(install):
    def write_pth_file(self):
        """
        This is a hack to get around some distributions installing stuff into
        lib64/python-x.x/dist-packages
        """
        lp = os.path.abspath(os.path.curdir)
        with open(PTH_FILE, 'w') as f:
            f.write(lp.replace('/lib/', '/lib64/'))

    def initialize_options(self):
        install.initialize_options(self)
        self.build_scripts = None

    def finalize_options(self):
        install.finalize_options(self)
        self.set_undefined_options('build', ('build_scripts', 'build_scripts'))

    def run(self):
        install.run(self)
        lp = sysconfig.get_path('stdlib')
        with open(PTH_FILE, 'w') as f:
            f.write('{0}/dist-packages'.format(lp))
        install.copy_file(self, PTH_FILE, os.path.join(self.install_lib,
                                                       PTH_FILE))

# HACK - HACK - HACK - HACK
#
# We externally make sure that numpy is installed because spead2 needs it there
# at compile time (and therefore at runtime too).

# An initial solution for this problem was to add numpy to the setup_requires
# argument of spead2's setup invocation. This solves the problem of compiling
# numpy, but requires some extra code to make numpy's include directory
# (which isn't installed in a standard location, and therefore must be queried
# to numpy itself via numpy.include_dir()) available to spead2's setup in order
# to build its C extensions correctly. The main drawback from this solution is
# that numpy's egg location remains inside the spead2's source code tree (in the
# root of the tree when using setuptools < 7, inside the .eggs/ directory when
# using setuptools>=7). This was reported in setuptool issues #209 and #391, but
# still remains an issue. Although one could live with such an installation, it
# doesn't sound ideal at all since the software is not installed when one would
# expect it to be; also permissions-based problems could arise.
#
# For the time being I'm choosing instead to simply install numpy via a pip
# command-line invocation. It will avoid any numpy mingling by spead2, and will
# return quickly if it has been already installed
#
# HACK - HACK - HACK - HACK
try:
    subprocess.check_call(['pip', 'install', 'numpy'])
except subprocess.CalledProcessError:
    try:
        subprocess.check_call(['easy_install', 'numpy'])
    except subprocess.CalledProcessError:
        raise Exception("Couldn't install numpy manually, sorry :(")

# Core requirements of DALiuGE
# Keep alpha-sorted PLEASE!
install_requires = [
    "boto3",
    "bottle",
    "configobj",
    "crc32c",
    "dill",
    "docker",
    "lockfile",
    "metis>=0.2a3",
    # 0.10.6 builds correctly with old (<=3.10) Linux kernels
    "netifaces>=0.10.6",
    "paramiko",
    "psutil",
    "pyswarm",
    "python-daemon",
    "pyzmq",
    "scp",
    # 1.10 contains an important race-condition fix on lazy-loaded modules
    'six>=1.10',
    # 0.6 brings python3 support plus other fixes
    "zerorpc >= 0.6"
]
# Keep alpha-sorted PLEASE!

# Python 3.6 is only supported in NetworkX 2 and above
if sys.version_info >= (3, 6, 0):
    install_requires.append("networkx>=2.0")
else:
    install_requires.append("networkx")

# Python 2 support has been dropped in zeroconf 0.20.
# Also, 0.19.0 requires netifaces < 0.10.5, exactly the opposite of what *we* need
# Also, 0.21.0 erroneously tags 3.4 as supported, while in fact it isn't
# (see https://github.com/jstasiak/python-zeroconf/issues/139 for details).
# We provided a fix for that, so from 0.21.1 is already good.
if sys.version_info[:2] == (2, 7):
    install_requires.append("zeroconf == 0.19.1")
elif sys.version_info[:2] <= (3, 4):
    install_requires.append("zeroconf != 0.21.0")
else:
    install_requires.append("zeroconf >= 0.19.1")

# Extra requirements that are not needed by your every day daliuge installation
extra_requires = {
    # spead is required only for a specific app and its test, which we
    # skip anyway if spead is not found
    'spead': ["spead2==0.4.0"],

    # Pyro4 and RPyC are semi-supported RPC alternatives
    # (while zerorpc is the default)
    'pyro': ['Pyro4>=4.47'],  # 4.47 contains a fix we contributed
    'rpyc': ['rpyc'],

    # drive-casa is used by some manual tests under test/integrate
    'drive-casa': ["drive-casa>0.7"],

    # MPI support (MPIApp drops and HPC experiments) requires mpi4py
    'MPI': ['mpi4py']
}

setup(
      name='daliuge',
      version=get_version_info()[0],
      description=u'Data Activated \uF9CA (flow) Graph Engine - DALiuGE',
      long_description="The SKA-SDK prototype for the Execution Framework component",
      author='ICRAR DIA Group',
      author_email='dfms_prototype@googlegroups.com',
      url='https://github.com/ICRAR/daliuge',
      license="LGPLv2+",
      packages=find_packages(exclude=('test', 'test.*', 'fabfile')),
      package_data={
        'dlg.apps': ['dlg_app.h'],
        'dlg.manager': ['web/*.html', 'web/static/css/*.css',
                        'web/static/fonts/*', 'web/static/js/*.js',
                        'web/static/js/d3/*'],
        'dlg.dropmake': ['web/lg_editor.html', 'web/*.css', 'web/*.js',
                         'web/*.json', 'web/*.map',
                         'web/img/jsoneditor-icons.png', 'web/pg_viewer.html',
                         'web/matrix_vis.html',
                         'lib/libmetis.*'],
        'test.dropmake': ['logical_graphs/*.json'],
        'test.apps': ['dynlib_example.c']
      },
      install_requires=install_requires,
      extras_require=extra_requires,
      test_suite="test",
      entry_points={
          'console_scripts': [
              'dlg=dlg.tool:run',  # One tool to rule them all
          ],
      },
      cmdclass={
            'install': lib64_path
            },
)
<commit_msg>daliuge 0.6.1<commit_after>#
#    ICRAR - International Centre for Radio Astronomy Research
#    (c) UWA - The University of Western Australia, 2016
#    Copyright by UWA (in the framework of the ICRAR)
#    All rights reserved
#
#    This library is free software; you can redistribute it and/or
#    modify it under the terms of the GNU Lesser General Public
#    License as published by the Free Software Foundation; either
#    version 2.1 of the License, or (at your option) any later version.
#
#    This library is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#    Lesser General Public License for more details.
#
#    You should have received a copy of the GNU Lesser General Public
#    License along with this library; if not, write to the Free Software
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
#    MA 02111-1307  USA
#

import os
import subprocess
import sys
import sysconfig

from setuptools import find_packages
from setuptools import setup
from setuptools.command.install import install

# Version information
# We do like numpy: we have a major/minor/patch hand-written version written
# here. If we find the git commit (either via "git" command execution or in a
# dlg/version.py file) we append it to the VERSION later.
# The RELEASE flag allows us to create development versions properly supported
# by setuptools/pkg_resources or "final" versions.
MAJOR   = 0
MINOR   = 6
PATCH   = 1
RELEASE = True
VERSION = '%d.%d.%d' % (MAJOR, MINOR, PATCH)
VERSION_FILE = 'dlg/version.py'
PTH_FILE = 'lib64_dist.pth'

def get_git_version():
    out = subprocess.check_output(['git', 'rev-parse', 'HEAD'])
    return out.strip().decode('ascii')

def get_version_info():
    git_version = 'Unknown'
    if os.path.exists('.git'):
        git_version = get_git_version()
    full_version = VERSION
    if not RELEASE:
        full_version = '%s.dev0+%s' % (VERSION, git_version[:7])
    return full_version, git_version

def write_version_info():
    tpl = """
# THIS FILE IS GENERATED BY DALIUGE'S SETUP.PY
# DO NOT MODIFY BY HAND
version = '%(version)s'
git_version = '%(git_version)s'
full_version = '%(full_version)s'
is_release = %(is_release)s

if not is_release:
    version = full_version
"""
    full_version, git_version = get_version_info()
    with open(VERSION_FILE, 'w') as f:
        info = tpl % {'version': VERSION,
                      'full_version': full_version,
                      'git_version': git_version,
                      'is_release': RELEASE}
        f.write(info.strip())

# Every time we overwrite the version file
write_version_info()

# HACK - HACK - HACK - HACK
class lib64_path(install):
    def write_pth_file(self):
        """
        This is a hack to get around some distributions installing stuff into
        lib64/python-x.x/dist-packages
        """
        lp = os.path.abspath(os.path.curdir)
        with open(PTH_FILE, 'w') as f:
            f.write(lp.replace('/lib/', '/lib64/'))

    def initialize_options(self):
        install.initialize_options(self)
        self.build_scripts = None

    def finalize_options(self):
        install.finalize_options(self)
        self.set_undefined_options('build', ('build_scripts', 'build_scripts'))

    def run(self):
        install.run(self)
        lp = sysconfig.get_path('stdlib')
        with open(PTH_FILE, 'w') as f:
            f.write('{0}/dist-packages'.format(lp))
        install.copy_file(self, PTH_FILE, os.path.join(self.install_lib,
                                                       PTH_FILE))

# HACK - HACK - HACK - HACK
#
# We externally make sure that numpy is installed because spead2 needs it there
# at compile time (and therefore at runtime too).

# An initial solution for this problem was to add numpy to the setup_requires
# argument of spead2's setup invocation. This solves the problem of compiling
# numpy, but requires some extra code to make numpy's include directory
# (which isn't installed in a standard location, and therefore must be queried
# to numpy itself via numpy.include_dir()) available to spead2's setup in order
# to build its C extensions correctly. The main drawback from this solution is
# that numpy's egg location remains inside the spead2's source code tree (in the
# root of the tree when using setuptools < 7, inside the .eggs/ directory when
# using setuptools>=7). This was reported in setuptool issues #209 and #391, but
# still remains an issue. Although one could live with such an installation, it
# doesn't sound ideal at all since the software is not installed when one would
# expect it to be; also permissions-based problems could arise.
#
# For the time being I'm choosing instead to simply install numpy via a pip
# command-line invocation. It will avoid any numpy mingling by spead2, and will
# return quickly if it has been already installed
#
# HACK - HACK - HACK - HACK
try:
    subprocess.check_call(['pip', 'install', 'numpy'])
except subprocess.CalledProcessError:
    try:
        subprocess.check_call(['easy_install', 'numpy'])
    except subprocess.CalledProcessError:
        raise Exception("Couldn't install numpy manually, sorry :(")

# Core requirements of DALiuGE
# Keep alpha-sorted PLEASE!
install_requires = [
    "boto3",
    "bottle",
    "configobj",
    "crc32c",
    "dill",
    "docker",
    "lockfile",
    "metis>=0.2a3",
    # 0.10.6 builds correctly with old (<=3.10) Linux kernels
    "netifaces>=0.10.6",
    "paramiko",
    "psutil",
    "pyswarm",
    "python-daemon",
    "pyzmq",
    "scp",
    # 1.10 contains an important race-condition fix on lazy-loaded modules
    'six>=1.10',
    # 0.6 brings python3 support plus other fixes
    "zerorpc >= 0.6"
]
# Keep alpha-sorted PLEASE!

# Python 3.6 is only supported in NetworkX 2 and above
if sys.version_info >= (3, 6, 0):
    install_requires.append("networkx>=2.0")
else:
    install_requires.append("networkx")

# Python 2 support has been dropped in zeroconf 0.20.
# Also, 0.19.0 requires netifaces < 0.10.5, exactly the opposite of what *we* need
# Also, 0.21.0 erroneously tags 3.4 as supported, while in fact it isn't
# (see https://github.com/jstasiak/python-zeroconf/issues/139 for details).
# We provided a fix for that, so from 0.21.1 is already good.
if sys.version_info[:2] == (2, 7):
    install_requires.append("zeroconf == 0.19.1")
elif sys.version_info[:2] <= (3, 4):
    install_requires.append("zeroconf != 0.21.0")
else:
    install_requires.append("zeroconf >= 0.19.1")

# Extra requirements that are not needed by your every day daliuge installation
extra_requires = {
    # spead is required only for a specific app and its test, which we
    # skip anyway if spead is not found
    'spead': ["spead2==0.4.0"],

    # Pyro4 and RPyC are semi-supported RPC alternatives
    # (while zerorpc is the default)
    'pyro': ['Pyro4>=4.47'],  # 4.47 contains a fix we contributed
    'rpyc': ['rpyc'],

    # drive-casa is used by some manual tests under test/integrate
    'drive-casa': ["drive-casa>0.7"],

    # MPI support (MPIApp drops and HPC experiments) requires mpi4py
    'MPI': ['mpi4py']
}

setup(
      name='daliuge',
      version=get_version_info()[0],
      description=u'Data Activated \uF9CA (flow) Graph Engine - DALiuGE',
      long_description="The SKA-SDK prototype for the Execution Framework component",
      author='ICRAR DIA Group',
      author_email='dfms_prototype@googlegroups.com',
      url='https://github.com/ICRAR/daliuge',
      license="LGPLv2+",
      packages=find_packages(exclude=('test', 'test.*', 'fabfile')),
      package_data={
        'dlg.apps': ['dlg_app.h'],
        'dlg.manager': ['web/*.html', 'web/static/css/*.css',
                        'web/static/fonts/*', 'web/static/js/*.js',
                        'web/static/js/d3/*'],
        'dlg.dropmake': ['web/lg_editor.html', 'web/*.css', 'web/*.js',
                         'web/*.json', 'web/*.map',
                         'web/img/jsoneditor-icons.png', 'web/pg_viewer.html',
                         'web/matrix_vis.html',
                         'lib/libmetis.*'],
        'test.dropmake': ['logical_graphs/*.json'],
        'test.apps': ['dynlib_example.c']
      },
      install_requires=install_requires,
      extras_require=extra_requires,
      test_suite="test",
      entry_points={
          'console_scripts': [
              'dlg=dlg.tool:run',  # One tool to rule them all
          ],
      },
      cmdclass={
            'install': lib64_path
            },
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
from setuptools import setup
from setuptools.extension import Extension
from setuptools.command.build_ext import build_ext
from distutils import errors

import os
import sys

def get_version():
    curdir = os.path.dirname(__file__)
    filename = os.path.join(curdir, 'src', 'psd_tools', 'version.py')
    with open(filename, 'rb') as fp:
        return fp.read().decode('utf8').split('=')[1].strip(" \n'")

setup_args = dict(
    name='psd-tools2',
    version=get_version(),
    author='Kota Yamaguchi',
    author_email='KotaYamaguchi1984@gmail.com',
    url='https://github.com/kyamagu/psd-tools',

    description='Fork of psd-tools for working with Adobe Photoshop PSD files',
    long_description=(
        open('README.rst').read() + "\n\n" + open('CHANGES.rst').read()
    ),
    license='MIT License',
    requires=['docopt (>= 0.5)', 'Pillow'],
    install_requires=['docopt >= 0.5', 'packbits', 'exifread'],
    keywords="pymaging psd imaging pil pillow",
    zip_safe=False,

    package_dir={'': 'src'},
    packages=['psd_tools', 'psd_tools.reader', 'psd_tools.decoder',
              'psd_tools.user_api', 'psd_tools.icc_profiles'],
    package_data={'psd_tools': ['icc_profiles/*.icc']},
    entry_points={
        'console_scripts': ['psd-tools=psd_tools.__main__:main']
    },

    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: Implementation :: CPython',
        'Programming Language :: Python :: Implementation :: PyPy',
        'Topic :: Multimedia :: Graphics',
        'Topic :: Multimedia :: Graphics :: Viewers',
        'Topic :: Multimedia :: Graphics :: Graphics Conversion',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
)

# ========== make extension optional (copied from coverage.py) =========

# A replacement for the build_ext command which raises a single exception
# if the build fails, so we can fallback nicely.

ext_errors = (
    errors.CCompilerError,
    errors.DistutilsExecError,
    errors.DistutilsPlatformError,
)
if sys.platform == 'win32' and sys.version_info > (2, 6):
    # 2.6's distutils.msvc9compiler can raise an IOError when failing to
    # find the compiler
    ext_errors += (IOError,)

class BuildFailed(Exception):
    """Raise this to indicate the C extension wouldn't build."""
    def __init__(self):
        Exception.__init__(self)
        self.cause = sys.exc_info()[1] # work around py 2/3 different syntax

class ve_build_ext(build_ext):
    """Build C extensions, but fail with a straightforward exception."""

    def run(self):
        """Wrap `run` with `BuildFailed`."""
        try:
            build_ext.run(self)
        except errors.DistutilsPlatformError:
            raise BuildFailed()

    def build_extension(self, ext):
        """Wrap `build_extension` with `BuildFailed`."""
        try:
            # Uncomment to test compile failures:
            #   raise errors.CCompilerError("OOPS")
            build_ext.build_extension(self, ext)
        except ext_errors:
            raise BuildFailed()
        except ValueError:
            # this can happen on Windows 64 bit, see Python issue 7511
            if "'path'" in str(sys.exc_info()[1]): # works with both py 2/3
                raise BuildFailed()
            raise

# There are a few reasons we might not be able to compile the C extension.
# Figure out if we should attempt the C extension or not.

compile_extension = True

if sys.platform.startswith('java'):
    # Jython can't compile C extensions
    compile_extension = False

if '__pypy__' in sys.builtin_module_names:
    # Cython extensions are slow under PyPy
    compile_extension = False

if compile_extension:
    setup_args.update(dict(
        ext_modules = [
            Extension(
                "psd_tools._compression",
                sources=["src/psd_tools/_compression.c"]
            )
        ],
        cmdclass = {'build_ext': ve_build_ext},
    ))

def main():
    """Actually invoke setup() with the arguments we built above."""
    # For a variety of reasons, it might not be possible to install the C
    # extension.  Try it with, and if it fails, try it without.
    try:
        setup(**setup_args)
    except BuildFailed:
        msg = "Couldn't install with extension module, trying without it..."
        exc = sys.exc_info()[1]
        exc_msg = "%s: %s" % (exc.__class__.__name__, exc.cause)
        print("**\n** %s\n** %s\n**" % (msg, exc_msg))

        del setup_args['ext_modules']
        setup(**setup_args)

if __name__ == '__main__':
    main()
<commit_msg>Fix URL<commit_after>#!/usr/bin/env python
from setuptools import setup
from setuptools.extension import Extension
from setuptools.command.build_ext import build_ext
from distutils import errors

import os
import sys

def get_version():
    curdir = os.path.dirname(__file__)
    filename = os.path.join(curdir, 'src', 'psd_tools', 'version.py')
    with open(filename, 'rb') as fp:
        return fp.read().decode('utf8').split('=')[1].strip(" \n'")

setup_args = dict(
    name='psd-tools2',
    version=get_version(),
    author='Kota Yamaguchi',
    author_email='KotaYamaguchi1984@gmail.com',
    url='https://github.com/kyamagu/psd-tools2',

    description='Fork of psd-tools for working with Adobe Photoshop PSD files',
    long_description=(
        open('README.rst').read() + "\n\n" + open('CHANGES.rst').read()
    ),
    license='MIT License',
    requires=['docopt (>= 0.5)', 'Pillow'],
    install_requires=['docopt >= 0.5', 'packbits', 'exifread'],
    keywords="pymaging psd imaging pil pillow",
    zip_safe=False,

    package_dir={'': 'src'},
    packages=['psd_tools', 'psd_tools.reader', 'psd_tools.decoder',
              'psd_tools.user_api', 'psd_tools.icc_profiles'],
    package_data={'psd_tools': ['icc_profiles/*.icc']},
    entry_points={
        'console_scripts': ['psd-tools=psd_tools.__main__:main']
    },

    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: Implementation :: CPython',
        'Programming Language :: Python :: Implementation :: PyPy',
        'Topic :: Multimedia :: Graphics',
        'Topic :: Multimedia :: Graphics :: Viewers',
        'Topic :: Multimedia :: Graphics :: Graphics Conversion',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
)

# ========== make extension optional (copied from coverage.py) =========

# A replacement for the build_ext command which raises a single exception
# if the build fails, so we can fallback nicely.

ext_errors = (
    errors.CCompilerError,
    errors.DistutilsExecError,
    errors.DistutilsPlatformError,
)
if sys.platform == 'win32' and sys.version_info > (2, 6):
    # 2.6's distutils.msvc9compiler can raise an IOError when failing to
    # find the compiler
    ext_errors += (IOError,)

class BuildFailed(Exception):
    """Raise this to indicate the C extension wouldn't build."""
    def __init__(self):
        Exception.__init__(self)
        self.cause = sys.exc_info()[1] # work around py 2/3 different syntax

class ve_build_ext(build_ext):
    """Build C extensions, but fail with a straightforward exception."""

    def run(self):
        """Wrap `run` with `BuildFailed`."""
        try:
            build_ext.run(self)
        except errors.DistutilsPlatformError:
            raise BuildFailed()

    def build_extension(self, ext):
        """Wrap `build_extension` with `BuildFailed`."""
        try:
            # Uncomment to test compile failures:
            #   raise errors.CCompilerError("OOPS")
            build_ext.build_extension(self, ext)
        except ext_errors:
            raise BuildFailed()
        except ValueError:
            # this can happen on Windows 64 bit, see Python issue 7511
            if "'path'" in str(sys.exc_info()[1]): # works with both py 2/3
                raise BuildFailed()
            raise

# There are a few reasons we might not be able to compile the C extension.
# Figure out if we should attempt the C extension or not.

compile_extension = True

if sys.platform.startswith('java'):
    # Jython can't compile C extensions
    compile_extension = False

if '__pypy__' in sys.builtin_module_names:
    # Cython extensions are slow under PyPy
    compile_extension = False

if compile_extension:
    setup_args.update(dict(
        ext_modules = [
            Extension(
                "psd_tools._compression",
                sources=["src/psd_tools/_compression.c"]
            )
        ],
        cmdclass = {'build_ext': ve_build_ext},
    ))

def main():
    """Actually invoke setup() with the arguments we built above."""
    # For a variety of reasons, it might not be possible to install the C
    # extension.  Try it with, and if it fails, try it without.
    try:
        setup(**setup_args)
    except BuildFailed:
        msg = "Couldn't install with extension module, trying without it..."
        exc = sys.exc_info()[1]
        exc_msg = "%s: %s" % (exc.__class__.__name__, exc.cause)
        print("**\n** %s\n** %s\n**" % (msg, exc_msg))

        del setup_args['ext_modules']
        setup(**setup_args)

if __name__ == '__main__':
    main()
<|endoftext|>


<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
from setuptools import setup

this_dir = os.path.abspath(os.path.dirname(__file__))

VERSIONFILE = os.path.join(this_dir, "textx", "__init__.py")
VERSION = None
for line in open(VERSIONFILE, "r").readlines():
    if line.startswith('__version__'):
        VERSION = line.split('"')[1]

if not VERSION:
    raise RuntimeError('No version defined in textx.__init__.py')

if sys.argv[-1].startswith('publish'):
    if os.system("pip list | grep wheel"):
        print("wheel not installed.\nUse `pip install wheel`.\nExiting.")
        sys.exit()
    if os.system("pip list | grep twine"):
        print("twine not installed.\nUse `pip install twine`.\nExiting.")
        sys.exit()
    os.system("python setup.py sdist bdist_wheel")
    if sys.argv[-1] == 'publishtest':
        os.system("twine upload -r test dist/*")
    else:
        os.system("twine upload dist/*")
        print("You probably want to also tag the version now:")
        print("  git tag -a {0} -m 'version {0}'".format(VERSION))
        print("  git push --tags")
    sys.exit()

setup(version=VERSION)
<commit_msg>Remove check if wheel package is installed<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
from setuptools import setup

this_dir = os.path.abspath(os.path.dirname(__file__))

VERSIONFILE = os.path.join(this_dir, "textx", "__init__.py")
VERSION = None
for line in open(VERSIONFILE, "r").readlines():
    if line.startswith('__version__'):
        VERSION = line.split('"')[1]

if not VERSION:
    raise RuntimeError('No version defined in textx.__init__.py')

if sys.argv[-1].startswith('publish'):
    if os.system("pip list | grep twine"):
        print("twine not installed.\nUse `pip install twine`.\nExiting.")
        sys.exit()
    os.system("python setup.py sdist bdist_wheel")
    if sys.argv[-1] == 'publishtest':
        os.system("twine upload -r test dist/*")
    else:
        os.system("twine upload dist/*")
        print("You probably want to also tag the version now:")
        print("  git tag -a {0} -m 'version {0}'".format(VERSION))
        print("  git push --tags")
    sys.exit()

setup(version=VERSION)
<|endoftext|>


<commit_before>"""Pypackage's setup.py"""

import io
from setuptools import setup
from setuptools import find_packages
from setuptools.command.test import test as TestCommand

class PyTest(TestCommand):
    """TestCommand subclass to use pytest with setup.py test."""

    def finalize_options(self):
        """Find our package name and test options to fill out test_args."""

        TestCommand.finalize_options(self)
        self.test_args = ["-v", "-rx", "--cov-report", "term-missing", "--cov",
                          "pypackage", "test"]
        self.test_suite = True

    def run_tests(self):
        """pytest discovery and test execution."""

        import pytest
        raise SystemExit(pytest.main(self.test_args))

def long_description():
    with io.open("README.rst", "r", encoding="utf-8") as openreadme:
        return openreadme.read()

setup(
    name="pypackage",
    version="0.0.8",
    author="Adam Talsma",
    author_email="se-adam.talsma@ccpgames.com",
    url="http://ccpgames.github.io/pypackage",
    download_url="https://github.com/ccpgames/pypackage",
    description="Pypackage looks to package python without writing a setup.py",
    long_description=long_description(),
    packages=find_packages(exclude=["test"]),
    package_data={"pypackage": ["pypackage/classifiers"]},
    include_package_data=True,
    install_requires=[
        "wheel      >= 0.24.0",
        "setuptools >= 15.0",
        "pytest     >= 2.7.0",
        "nose       >= 1.3.0",
        "PyYAML     >= 3.0",
    ],
    cmdclass={"test": PyTest},
    tests_require=["pytest", "pytest-cov"],
    entry_points={"console_scripts": [
        "py-build   = pypackage.commands:build",
        "py-develop = pypackage.commands:develop",
        "py-install = pypackage.commands:install",
        "py-setup   = pypackage.commands:setup",
        "py-test    = pypackage.commands:run_tests",
    ]},
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Console',
        'Environment :: Console :: Curses',
        'Intended Audience :: Developers',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.4',
        'Topic :: Software Development',
        'Topic :: Software Development :: Code Generators',
        'Topic :: System :: Archiving :: Packaging',
        'Topic :: System :: Installation/Setup',
        'Topic :: System :: Software Distribution',
        'Topic :: Utilities'
    ],
)
<commit_msg>0.0.9 - automatic conversion from string -> list for single strings - extras_require can now be supplied with feature_requires, individual features will override their definitions in extras_require if they exist in both places - be less strict about the regex pattern's whitespace for finding author, version, etc<commit_after>"""Pypackage's setup.py"""

import io
from setuptools import setup
from setuptools import find_packages
from setuptools.command.test import test as TestCommand

class PyTest(TestCommand):
    """TestCommand subclass to use pytest with setup.py test."""

    def finalize_options(self):
        """Find our package name and test options to fill out test_args."""

        TestCommand.finalize_options(self)
        self.test_args = ["-v", "-rx", "--cov-report", "term-missing", "--cov",
                          "pypackage", "test"]
        self.test_suite = True

    def run_tests(self):
        """pytest discovery and test execution."""

        import pytest
        raise SystemExit(pytest.main(self.test_args))

def long_description():
    with io.open("README.rst", "r", encoding="utf-8") as openreadme:
        return openreadme.read()

setup(
    name="pypackage",
    version="0.0.9",
    author="Adam Talsma",
    author_email="se-adam.talsma@ccpgames.com",
    url="http://ccpgames.github.io/pypackage",
    download_url="https://github.com/ccpgames/pypackage",
    description="Pypackage looks to package python without writing a setup.py",
    long_description=long_description(),
    packages=find_packages(exclude=["test"]),
    package_data={"pypackage": ["pypackage/classifiers"]},
    include_package_data=True,
    install_requires=[
        "wheel      >= 0.24.0",
        "setuptools >= 15.0",
        "pytest     >= 2.7.0",
        "nose       >= 1.3.0",
        "PyYAML     >= 3.0",
    ],
    cmdclass={"test": PyTest},
    tests_require=["pytest", "pytest-cov"],
    entry_points={"console_scripts": [
        "py-build   = pypackage.commands:build",
        "py-develop = pypackage.commands:develop",
        "py-install = pypackage.commands:install",
        "py-setup   = pypackage.commands:setup",
        "py-test    = pypackage.commands:run_tests",
    ]},
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Console',
        'Environment :: Console :: Curses',
        'Intended Audience :: Developers',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.4',
        'Topic :: Software Development',
        'Topic :: Software Development :: Code Generators',
        'Topic :: System :: Archiving :: Packaging',
        'Topic :: System :: Installation/Setup',
        'Topic :: System :: Software Distribution',
        'Topic :: Utilities'
    ],
)
<|endoftext|>


<commit_before>from distutils.core import setup
setup(
    name = "django-achievements",
    packages = ["achievements", "achievements.migrations"],
    version = "0.0.1",
    description = "Django application to deal with achievements and rewards unlocked by users",
    author = "Olivier Girardot",
    author_email = "ssaboum@gmail.com",
    url = "https://github.com/ssaboum/django-achievements",
    classifiers = [
        "Programming Language :: Python",
        "License :: OSI Approved :: BSD License",
        "Operating System :: OS Independent",
        "Development Status :: 3 - Alpha",
        "Environment :: Web Environment",
        "Framework :: Django",
        "Intended Audience :: Developers",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
        "Topic :: Internet :: WWW/HTTP :: WSGI",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
)
<commit_msg>tagging 0.0.2<commit_after>from distutils.core import setup
setup(
    name = "django-achievements",
    packages = ["achievements", "achievements.migrations"],
    version = "0.0.2",
    description = "Django application to deal with achievements and rewards unlocked by users",
    author = "Olivier Girardot",
    author_email = "ssaboum@gmail.com",
    url = "https://github.com/ssaboum/django-achievements",
    classifiers = [
        "Programming Language :: Python",
        "License :: OSI Approved :: BSD License",
        "Operating System :: OS Independent",
        "Development Status :: 3 - Alpha",
        "Environment :: Web Environment",
        "Framework :: Django",
        "Intended Audience :: Developers",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
        "Topic :: Internet :: WWW/HTTP :: WSGI",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
)
<|endoftext|>


<commit_before>import os
from setuptools import setup

def read(fname):
    return open(os.path.join(os.path.dirname(__file__), fname)).read()

install_requires = [
    'requests',
    'simplejson',
    'python-dateutil',
    'six'
]

tests_require = [
    'nose',
    'coverage'
]

setup(
    name="DecipherAPI",
    version="0.1",
    author="InContext Solutions",
    author_email="quant@incontextsolutions.com",
    url="http://www.incontextsolutions.com/",
    download_url="https://github.com/InContextSolutions/Decipher/tarball/v0.1",
    description="A Python client for Decipher's Beacon API",
    keywords=['Decipher', 'survey'],
    packages=["decipher"],
    long_description=read('README.md'),
    setup_requires=['nose'],
    install_requires=install_requires,
    tests_require=tests_require,
    entry_points={
        'console_scripts': [
            'decipher = decipher:cli',
        ],
    },
    classifiers=[]
)
<commit_msg>fix readme<commit_after>from setuptools import setup

install_requires = [
    'requests',
    'simplejson',
    'python-dateutil',
    'six'
]

tests_require = [
    'nose',
    'coverage'
]

setup(
    name="DecipherAPI",
    version="0.1",
    author="InContext Solutions",
    author_email="quant@incontextsolutions.com",
    url="http://www.incontextsolutions.com/",
    download_url="https://github.com/InContextSolutions/Decipher/tarball/v0.1",
    description="A Python client for Decipher's Beacon API",
    keywords=['Decipher', 'survey'],
    packages=["decipher"],
    setup_requires=['nose'],
    install_requires=install_requires,
    tests_require=tests_require,
    entry_points={
        'console_scripts': [
            'decipher = decipher:cli',
        ],
    },
    classifiers=[]
)
<|endoftext|>


<commit_before>###############################################################################
#
# The MIT License (MIT)
#
# Copyright (c) Tavendo GmbH
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
###############################################################################

from __future__ import absolute_import

import sys
import platform
from setuptools import setup

CPY = platform.python_implementation() == 'CPython'
PY3 = sys.version_info >= (3,)
PY33 = (3, 3) <= sys.version_info < (3, 4)

with open('txaio/_version.py') as f:
    exec(f.read())  # defines __version__

with open('README.rst') as f:
    docstr = f.read()

# Twisted dependencies
#
extras_require_twisted = [
    'zope.interface>=3.6',              # Zope Public License
    'twisted>=12.1.0',                  # MIT
]

# asyncio dependencies
#
if PY3:
    if PY33:
        # "Tulip"
        extras_require_asyncio = [
            "asyncio>=3.4.3"            # Apache 2.0
        ]
    else:
        # Python 3.4+ has asyncio builtin
        extras_require_asyncio = []
else:
    # backport of asyncio for Python 2
    extras_require_asyncio = [
        "trollius>=2.0",                # Apache 2.0
        "futures>=3.0.3"                # BSD license
    ]

# development dependencies
#
extras_require_dev = [
    'pytest>=2.6.4',                    # MIT
    'pytest-cov>=1.8.1',                # MIT
    'pep8>=1.6.2',                      # MIT
    'sphinx>=1.2.3',                    # BSD
    'pyenchant>=1.6.6',                 # LGPL
    'sphinxcontrib-spelling>=2.1.2',    # BSD
    'sphinx_rtd_theme>=0.1.9',          # BSD
    'tox>=2.1.1',                       # MIT
    'mock==1.3.0',                      # BSD
    'twine>=1.6.5',                     # Apache 2.0
]

# everything
#
extras_require_all = extras_require_twisted + extras_require_asyncio

setup(
    name='txaio',
    version=__version__,
    description='Compatibility API between asyncio/Twisted/Trollius',
    long_description=docstr,
    author='Tavendo GmbH',
    author_email='autobahnws@googlegroups.com',
    url='https://github.com/crossbario/txaio',
    platforms=('Any'),
    install_requires=[
        'six'
    ],
    extras_require={
        'twisted': extras_require_twisted,
        'asyncio': extras_require_asyncio,
        'dev': extras_require_dev,
        'all': extras_require_all
    },
    packages=['txaio'],
    zip_safe=False,
    # http://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=[
        "License :: OSI Approved :: MIT License",
        "Development Status :: 5 - Production/Stable",
        "Environment :: Console",
        "Framework :: Twisted",
        "Intended Audience :: Developers",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Topic :: Software Development :: Libraries",
        "Topic :: Software Development :: Libraries :: Application Frameworks",
    ],
    keywords='asyncio twisted trollius coroutine',
)
<commit_msg>add Python language version tags (fixes #65)<commit_after>###############################################################################
#
# The MIT License (MIT)
#
# Copyright (c) Tavendo GmbH
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
###############################################################################

from __future__ import absolute_import

import sys
import platform
from setuptools import setup

CPY = platform.python_implementation() == 'CPython'
PY3 = sys.version_info >= (3,)
PY33 = (3, 3) <= sys.version_info < (3, 4)

with open('txaio/_version.py') as f:
    exec(f.read())  # defines __version__

with open('README.rst') as f:
    docstr = f.read()

# Twisted dependencies
#
extras_require_twisted = [
    'zope.interface>=3.6',              # Zope Public License
    'twisted>=12.1.0',                  # MIT
]

# asyncio dependencies
#
if PY3:
    if PY33:
        # "Tulip"
        extras_require_asyncio = [
            "asyncio>=3.4.3"            # Apache 2.0
        ]
    else:
        # Python 3.4+ has asyncio builtin
        extras_require_asyncio = []
else:
    # backport of asyncio for Python 2
    extras_require_asyncio = [
        "trollius>=2.0",                # Apache 2.0
        "futures>=3.0.3"                # BSD license
    ]

# development dependencies
#
extras_require_dev = [
    'pytest>=2.6.4',                    # MIT
    'pytest-cov>=1.8.1',                # MIT
    'pep8>=1.6.2',                      # MIT
    'sphinx>=1.2.3',                    # BSD
    'pyenchant>=1.6.6',                 # LGPL
    'sphinxcontrib-spelling>=2.1.2',    # BSD
    'sphinx_rtd_theme>=0.1.9',          # BSD
    'tox>=2.1.1',                       # MIT
    'mock==1.3.0',                      # BSD
    'twine>=1.6.5',                     # Apache 2.0
]

# everything
#
extras_require_all = extras_require_twisted + extras_require_asyncio

setup(
    name='txaio',
    version=__version__,
    description='Compatibility API between asyncio/Twisted/Trollius',
    long_description=docstr,
    author='Tavendo GmbH',
    author_email='autobahnws@googlegroups.com',
    url='https://github.com/crossbario/txaio',
    platforms=('Any'),
    install_requires=[
        'six'
    ],
    extras_require={
        'twisted': extras_require_twisted,
        'asyncio': extras_require_asyncio,
        'dev': extras_require_dev,
        'all': extras_require_all
    },
    packages=['txaio'],
    zip_safe=False,
    # http://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=[
        "License :: OSI Approved :: MIT License",
        "Development Status :: 5 - Production/Stable",
        "Environment :: Console",
        "Framework :: Twisted",
        "Intended Audience :: Developers",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: Implementation :: CPython",
        "Programming Language :: Python :: Implementation :: PyPy",
        "Topic :: Software Development :: Libraries",
        "Topic :: Software Development :: Libraries :: Application Frameworks",
    ],
    keywords='asyncio twisted trollius coroutine',
)
<|endoftext|>


<commit_before>#!/usr/bin/python
# Copyright (c) 2010-2011 OpenStack, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from setuptools import setup, find_packages
from setuptools.command.sdist import sdist
import os
import subprocess
try:
    from babel.messages import frontend
except ImportError:
    frontend = None

from sos import __version__ as version

class local_sdist(sdist):
    """Customized sdist hook - builds the ChangeLog file from VC first"""

    def run(self):
        if os.path.isdir('.bzr'):
            # We're in a bzr branch

            log_cmd = subprocess.Popen(["bzr", "log", "--gnu"],
                                       stdout=subprocess.PIPE)
            changelog = log_cmd.communicate()[0]
            with open("ChangeLog", "w") as changelog_file:
                changelog_file.write(changelog)
        sdist.run(self)

name = 'sos'

cmdclass = {'sdist': local_sdist}

if frontend:
    cmdclass.update({
        'compile_catalog': frontend.compile_catalog,
        'extract_messages': frontend.extract_messages,
        'init_catalog': frontend.init_catalog,
        'update_catalog': frontend.update_catalog,
    })

setup(
    name=name,
    version=version,
    description='Swift Origin Server',
    license='Apache License (2.0)',
    author='OpenStack, LLC.',
    author_email='openstack-admins@lists.launchpad.net',
    url='https://github.com/dpgoetz/sos',
    packages=find_packages(exclude=['test_sos', 'bin']),
    test_suite='nose.collector',
    cmdclass=cmdclass,
    classifiers=[
        'Development Status :: 4 - Beta',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: POSIX :: Linux',
        'Programming Language :: Python :: 2.6',
        'Environment :: No Input/Output (Daemon)',
        ],
    install_requires=[],  # removed for better compat
    scripts=[
        'bin/swift-origin-prep',
        ],
    entry_points={
        'paste.filter_factory': [
            'sos=sos.origin:filter_factory',
            ],
        },
    )
<commit_msg>cleaned up setup.py<commit_after>#!/usr/bin/python
# Copyright (c) 2010-2011 OpenStack, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from setuptools import setup, find_packages

from sos import __version__ as version

name = 'sos'

setup(
    name=name,
    version=version,
    description='Swift Origin Server',
    license='Apache License (2.0)',
    author='OpenStack, LLC.',
    author_email='david.goetz@rackspace.com',
    url='https://github.com/dpgoetz/sos',
    packages=find_packages(exclude=['test_sos', 'bin']),
    test_suite='nose.collector',
    classifiers=[
        'Development Status :: 4 - Beta',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: POSIX :: Linux',
        'Programming Language :: Python :: 2.6',
        'Environment :: No Input/Output (Daemon)',
        ],
    install_requires=[],  # removed for better compat
    scripts=[
        'bin/swift-origin-prep',
        ],
    entry_points={
        'paste.filter_factory': [
            'sos=sos.origin:filter_factory',
            ],
        },
    )
<|endoftext|>


<commit_before>import os
import sys
import codecs
import os.path
from distutils.util import convert_path
from setuptools import setup, find_packages

sys.path.append(os.getcwd())
ver_path = convert_path('openpnm/__version__.py')

def read(rel_path):
    here = os.path.abspath(os.path.dirname(__file__))
    with codecs.open(os.path.join(here, rel_path), 'r') as fp:
        return fp.read()

def get_version(rel_path):
    for line in read(rel_path).splitlines():
        if line.startswith('__version__'):
            delim = '"' if '"' in line else "'"
            ver = line.split(delim)[1].split(".")
            if "dev0" in ver:
                ver.remove("dev0")
            return ".".join(ver)
    else:
        raise RuntimeError("Unable to find version string.")

# Read the contents of README file
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
    long_description = f.read()

setup(
    name='openpnm',
    description='A framework for conducting pore network modeling simulations '
    + 'of multiphase transport in porous materials',
    long_description=long_description,
    long_description_content_type='text/markdown',
    version=get_version(ver_path),
    zip_safe=False,
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python',
        'Topic :: Scientific/Engineering',
        'Topic :: Scientific/Engineering :: Physics'
    ],
    packages=find_packages("."),
    install_requires=[
        'chemicals',
        'docrep',
        'flatdict',
        'h5py',
        'jsonschema',
        'json-tricks',
        'matplotlib',
        'networkx',
        'numba',
        'numpy',
        'pandas',
        'pypardiso',
        'scikit-image',
        'scipy',
        'sympy',
        'terminaltables',
        'tqdm',
        'traits',
        'transforms3d',
    ],
    author='OpenPNM Team',
    author_email='jgostick@uwaterloo.ca',
    download_url='https://github.com/PMEAL/OpenPNM/',
    url='http://openpnm.org',
    project_urls={
        'Documentation': 'https://openpnm.org',
        'Source': 'https://github.com/PMEAL/OpenPNM',
        'Tracker': 'https://github.com/PMEAL/OpenPNM/issues',
    },
)
<commit_msg>removing several unneeded dependencies<commit_after>import os
import sys
import codecs
import os.path
from distutils.util import convert_path
from setuptools import setup, find_packages

sys.path.append(os.getcwd())
ver_path = convert_path('openpnm/__version__.py')

def read(rel_path):
    here = os.path.abspath(os.path.dirname(__file__))
    with codecs.open(os.path.join(here, rel_path), 'r') as fp:
        return fp.read()

def get_version(rel_path):
    for line in read(rel_path).splitlines():
        if line.startswith('__version__'):
            delim = '"' if '"' in line else "'"
            ver = line.split(delim)[1].split(".")
            if "dev0" in ver:
                ver.remove("dev0")
            return ".".join(ver)
    else:
        raise RuntimeError("Unable to find version string.")

# Read the contents of README file
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
    long_description = f.read()

setup(
    name='openpnm',
    description='A framework for conducting pore network modeling simulations '
    + 'of multiphase transport in porous materials',
    long_description=long_description,
    long_description_content_type='text/markdown',
    version=get_version(ver_path),
    zip_safe=False,
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python',
        'Topic :: Scientific/Engineering',
        'Topic :: Scientific/Engineering :: Physics'
    ],
    packages=find_packages("."),
    install_requires=[
        'chemicals',
        'docrep',
        'h5py',
        'jsonschema',
        'matplotlib',
        'networkx',
        'numba',
        'numpy',
        'pandas',
        'pypardiso',
        'scikit-image',
        'scipy',
        'sympy',
        'tqdm',
        'transforms3d',
    ],
    author='OpenPNM Team',
    author_email='jgostick@uwaterloo.ca',
    download_url='https://github.com/PMEAL/OpenPNM/',
    url='http://openpnm.org',
    project_urls={
        'Documentation': 'https://openpnm.org',
        'Source': 'https://github.com/PMEAL/OpenPNM',
        'Tracker': 'https://github.com/PMEAL/OpenPNM/issues',
    },
)
<|endoftext|>