<commit_before>#!/usr/bin/python2.4
#
# Copyright 2005-2009 Google Inc.
#
# 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.
# ========================================================================

"""Creates application specific meta-installers.

Run this script with the directory that contains the build files,
GoogleupdateSetup_<lang>.exe and pass it the file that contains the application
information to be stamped inside the binary.

"""

import codecs
import os
import sys
import re
import urllib

class Bundle:
  """Represents the information for a bundle"""
  def __init__(self, exe_name, admin, language,
               browser_type, stats, installers_txt_filename, applications):
    self.applications = applications
    self.name = exe_name
    self.needs_admin = admin
    self.lang = language
    self.browser = browser_type
    self.usage_stats = stats
    self.installers_txt_filename = installers_txt_filename
    self.output_file_name = ""

def UrlEncodeString(name):
  """Converts the name into utf8 encoded and then urlencodes it.

  Args:
    name: The string to utf8 convert.

  Returns:
    The utf8 converted urlencoded string.
  """
  utf8_str = name.encode('utf8')
  return urllib.quote(utf8_str)

def ReadLinesFromFile(txt_filename):
  """Read all lines from a file encoded as utf8 or utf16.
  Args:
    txt_filename: A text file.

  Returns:
    A list of string.
  """
  try:
     installers_txt_file = codecs.open(installers_txt_filename, 'r', 'utf16')
     return installers_txt_file.readlines();
  except UnicodeError:
    installers_txt_file = codecs.open(installers_txt_filename)
    return installers_txt_file.readlines();
  except:
    return []

def ReadBundleInstallerFile(installers_txt_filename):
  """Read the installation file and return a list of the values.
     Only reads information from bundle installer files. The filename
     should contain the "bundle" word.
  Args:
    installers_txt_filename: The file which contains application specific
                             values, of guid, name, exe_name, needs_admin and
                             language.

  Returns:
    A dictionary of Bundles key=language, value=[Bundle]
  """
  bundles = {}
  for line in ReadLinesFromFile(installers_txt_filename):
    line = line.strip()
    if len(line) and not line.startswith('#'):
      (exe_name, needs_admin, language, browser, usage,
          bundle_apps) = eval(line)
      bundle = Bundle(exe_name, needs_admin, language,
                      browser, usage,
                      installers_txt_filename, bundle_apps)
      if (not bundles.has_key(language)):
        bundles[language] = [bundle]
      else:
        bundles[language] .append(bundle)
  return bundles

def BuildOutputDirectory(output_dir, lang, app):
  """Returns the output directory for the app.

  Args:
    app: The application for which to generate the path.
    lang: The language of the applicaiton.
    output_dir: The output directory.

  Returns:
    The path of the output file.
  """
  installers_txt_filename = app.installers_txt_filename

  end_idx = installers_txt_filename.find('_installers.txt')
  app_dirname = installers_txt_filename[:end_idx]

  app_path = os.path.join(output_dir, app_dirname)
  lang_path = os.path.join(app_path, lang)
  return lang_path

def SetOutputFileNames(file_name, apps, output_dir):
  """Sets the output file names inside the Application.

  Args:
    file_name: The input file name that needs to be stamped. This
               is used for deciding whether to use TEST in the name,
               and the directory. The names of this file is expected
               to be either TEST_GoogleUpdateSetup.exe or
               GoogleUpdateSetup.exe
    apps: Dictionary of applications keyed by language.
    output_dir: The output directory.

  Returns:
    All the applications for a particular language.
  """

  # Determine the language.
  for (lang, apps_lang) in apps.iteritems():
    # Get the output filename and set it on the application.
    for app in apps_lang:
      output_path = BuildOutputDirectory(output_dir, lang, app)
      path = os.path.join(output_path, GetOutputFileName(
          os.path.basename(file_name), app.name, lang))
      app.output_file_name = path

def GetOutputFileName(file, name, lang):
  """Creates the output file name based on the language and the name of the app.
  Args:
    test: Whether the input file name starts with TEST.
    name: The name of the application. I.e. Chrome, GoogleGears.
    lang: The language of the installer.
  Returns:
    The output filename
  """
  if file.startswith(('TEST_', 'TEST2_')):
    file_name = 'Tagged_%s_%sSetup_%s.exe' % (file.split('_', 1)[0], name, lang)
  else:
    file_name = 'Tagged_%sSetup_%s.exe' % (name, lang)
  return file_name

def BuildTagStringForBundle(bundle):
  """Builds the string to be tagged into the binary for a bundle.
  Args:
    bundle: Contains all information about a bundle.
  Returns:
    The string to be tagged into the installer.
  """
  args = '\"'
  first_app = True
  for app in bundle.applications:
    if not first_app:
      args += '&'
    first_app = False
    (guid, name, ap) = app
    display_name = UrlEncodeString(name)
    args += 'appguid=%s&appname=%s&needsadmin=%s' % (
        guid, display_name, bundle.needs_admin)
    if ap:
      args += '&ap=%s' % ap

  if bundle.usage_stats:
    args += '&usagestats=%s' % bundle.usage_stats
  if bundle.browser:
    args += '&browser=%s' % bundle.browser
  if bundle.lang:
    args += '&lang=%s' % bundle.lang
  args += '\"'
  return args

def TagOneFile(file, app, applytag_exe_name):
  """Tags one file with the information contained inside the application.
  Args:
    file: The input file to be stamped.
    app: Contains all the application data.
    applytag_exe_name: The full path of applytag.exe.
  """
  tag_string = BuildTagStringForBundle(app)

  out_path = app.output_file_name
  if not os.path.exists(file):
    print 'Could not find file %s required for creating %s' % (file, out_path)
    return False

  arguments = [applytag_exe_name,
               file,
               output_path,
               tag_string,
               'append'
              ]
  print 'Building %s with tag %s' % (output_path, tag_string)
  os.spawnv(os.P_WAIT, applytag_exe_name, arguments)
  return True

def GetAllSetupExeInDirectory(dir):
  """Creates a number of application specific binaries for the
     passed in binary.
  Args:
    dir: The input directory.
  Returns:
    A list of files that are match the regex:
    TEST_GoogleUpdateSetup_.*.exe$|^GoogleUpdateSetup_.*.exe$
  """
  ret_files = []
  files = os.listdir(dir)
  for file in files:
    regex = re.compile('^TEST_GoogleUpdateSetup_.*.exe$|'
                       '^GoogleUpdateSetup_.*.exe$')
    if not regex.match(file):
      continue
    ret_files.append(file)
  return ret_files

def TagBinary(apps, file, applytag_exe_name):
  """Creates a number of application specific binaries for the
     passed in binary.
  Args:
    apps: Dictionary of key=lang, value=[Application].
    file: The input file to be stamped.
    applytag_exe_name: The full path to applytag_exe_name.
  """
  if not apps:
    return
  for apps_lang in apps:
    for app in apps[apps_lang]:
      TagOneFile(file, app, applytag_exe_name)

def PrintUsage():
  print ''
  print 'Tool to stamp the Guid, Application name, needs admin into the'
  print 'meta-installer.'
  print 'Reads <installer file> which contains the application name,'
  print 'guid, needs_admin and stamps the meta-installer <file> with'
  print 'these values.'
  print 'For an example of the <installer file> take a look at'
  print '#/installers/googlegears_installer.txt'
  print ''
  print ('tag_meta_installers.py <applytag> <input file> <installer file>'
        '<output file>')

def main():
  if len(sys.argv) != 5:
    PrintUsage()
    return

  apply_tag_exe = sys.argv[1]
  input_file = sys.argv[2]
  file_name = sys.argv[3]
  output_dir = sys.argv[4]

  if not os.path.exists(apply_tag_exe):
    print "Could not find applytag.exe"
    PrintUsage()
    return

  if not os.path.exists(file_name):
    print "Invalid filename %s" % file_name
    PrintUsage()
    return

  if not os.path.exists(input_file):
    print "Invalid directory %s" % input_file
    PrintUsage()
    return

  if not os.path.exists(output_dir):
    os.mkdir(output_dir)

  # Read in the installers.txt file.
  apps = ReadBundleInstallerFile(file_name)

  SetOutputFileNames(input_file, apps, output_dir)
  TagBinary(apps, input_file, apply_tag_exe)

if __name__ == '__main__':
  main()
<commit_msg>Fixed generation of tagged installer.<commit_after>#!/usr/bin/python2.4
#
# Copyright 2005-2009 Google Inc.
#
# 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.
# ========================================================================

"""Creates application specific meta-installers.

Run this script with the directory that contains the build files,
GoogleupdateSetup_<lang>.exe and pass it the file that contains the application
information to be stamped inside the binary.

"""

import codecs
import os
import sys
import re
import urllib

class Bundle:
  """Represents the information for a bundle"""
  def __init__(self, exe_name, admin, language,
               browser_type, stats, installers_txt_filename, applications):
    self.applications = applications
    self.name = exe_name
    self.needs_admin = admin
    self.lang = language
    self.browser = browser_type
    self.usage_stats = stats
    self.installers_txt_filename = installers_txt_filename
    self.output_file_name = ""

def UrlEncodeString(name):
  """Converts the name into utf8 encoded and then urlencodes it.

  Args:
    name: The string to utf8 convert.

  Returns:
    The utf8 converted urlencoded string.
  """
  utf8_str = name.encode('utf8')
  return urllib.quote(utf8_str)

def ReadLinesFromFile(txt_filename):
  """Read all lines from a file encoded as utf8 or utf16.
  Args:
    txt_filename: A text file.

  Returns:
    A list of string.
  """
  try:
     installers_txt_file = codecs.open(txt_filename, 'r', 'utf16')
     return installers_txt_file.readlines();
  except UnicodeError:
    installers_txt_file = codecs.open(txt_filename)
    return installers_txt_file.readlines();
  except:
    return []

def ReadBundleInstallerFile(installers_txt_filename):
  """Read the installation file and return a list of the values.
     Only reads information from bundle installer files. The filename
     should contain the "bundle" word.
  Args:
    installers_txt_filename: The file which contains application specific
                             values, of guid, name, exe_name, needs_admin and
                             language.

  Returns:
    A dictionary of Bundles key=language, value=[Bundle]
  """
  bundles = {}
  for line in ReadLinesFromFile(installers_txt_filename):
    line = line.strip()
    if len(line) and not line.startswith('#'):
      (exe_name, needs_admin, language, browser, usage,
          bundle_apps) = eval(line)
      bundle = Bundle(exe_name, needs_admin, language,
                      browser, usage,
                      installers_txt_filename, bundle_apps)
      if (not bundles.has_key(language)):
        bundles[language] = [bundle]
      else:
        bundles[language] .append(bundle)
  return bundles

def BuildOutputDirectory(output_dir, lang, app):
  """Returns the output directory for the app.

  Args:
    app: The application for which to generate the path.
    lang: The language of the applicaiton.
    output_dir: The output directory.

  Returns:
    The path of the output file.
  """
  installers_txt_filename = app.installers_txt_filename

  end_idx = installers_txt_filename.find('_installers.txt')
  app_dirname = installers_txt_filename[:end_idx]

  app_path = os.path.join(output_dir, app_dirname)
  lang_path = os.path.join(app_path, lang)
  return lang_path

def SetOutputFileNames(file_name, apps, output_dir):
  """Sets the output file names inside the Application.

  Args:
    file_name: The input file name that needs to be stamped. This
               is used for deciding whether to use TEST in the name,
               and the directory. The names of this file is expected
               to be either TEST_GoogleUpdateSetup.exe or
               GoogleUpdateSetup.exe
    apps: Dictionary of applications keyed by language.
    output_dir: The output directory.

  Returns:
    All the applications for a particular language.
  """

  # Determine the language.
  for (lang, apps_lang) in apps.iteritems():
    # Get the output filename and set it on the application.
    for app in apps_lang:
      output_path = BuildOutputDirectory(output_dir, lang, app)
      path = os.path.join(output_path, GetOutputFileName(
          os.path.basename(file_name), app.name, lang))
      app.output_file_name = path

def GetOutputFileName(file, name, lang):
  """Creates the output file name based on the language and the name of the app.
  Args:
    test: Whether the input file name starts with TEST.
    name: The name of the application. I.e. Chrome, GoogleGears.
    lang: The language of the installer.
  Returns:
    The output filename
  """
  if file.startswith(('TEST_', 'TEST2_')):
    file_name = 'Tagged_%s_%sSetup_%s.exe' % (file.split('_', 1)[0], name, lang)
  else:
    file_name = 'Tagged_%sSetup_%s.exe' % (name, lang)
  return file_name

def BuildTagStringForBundle(bundle):
  """Builds the string to be tagged into the binary for a bundle.
  Args:
    bundle: Contains all information about a bundle.
  Returns:
    The string to be tagged into the installer.
  """
  args = '\"'
  first_app = True
  for app in bundle.applications:
    if not first_app:
      args += '&'
    first_app = False
    (guid, name, ap) = app
    display_name = UrlEncodeString(name)
    args += 'appguid=%s&appname=%s&needsadmin=%s' % (
        guid, display_name, bundle.needs_admin)
    if ap:
      args += '&ap=%s' % ap

  if bundle.usage_stats:
    args += '&usagestats=%s' % bundle.usage_stats
  if bundle.browser:
    args += '&browser=%s' % bundle.browser
  if bundle.lang:
    args += '&lang=%s' % bundle.lang
  args += '\"'
  return args

def TagOneFile(file, app, applytag_exe_name):
  """Tags one file with the information contained inside the application.
  Args:
    file: The input file to be stamped.
    app: Contains all the application data.
    applytag_exe_name: The full path of applytag.exe.
  """
  tag_string = BuildTagStringForBundle(app)

  out_path = app.output_file_name
  if not os.path.exists(file):
    print 'Could not find file %s required for creating %s' % (file, out_path)
    return False

  arguments = [applytag_exe_name,
               file,
               output_path,
               tag_string,
               'append'
              ]
  print 'Building %s with tag %s' % (output_path, tag_string)
  os.spawnv(os.P_WAIT, applytag_exe_name, arguments)
  return True

def GetAllSetupExeInDirectory(dir):
  """Creates a number of application specific binaries for the
     passed in binary.
  Args:
    dir: The input directory.
  Returns:
    A list of files that are match the regex:
    TEST_GoogleUpdateSetup_.*.exe$|^GoogleUpdateSetup_.*.exe$
  """
  ret_files = []
  files = os.listdir(dir)
  for file in files:
    regex = re.compile('^TEST_GoogleUpdateSetup_.*.exe$|'
                       '^GoogleUpdateSetup_.*.exe$')
    if not regex.match(file):
      continue
    ret_files.append(file)
  return ret_files

def TagBinary(apps, file, applytag_exe_name):
  """Creates a number of application specific binaries for the
     passed in binary.
  Args:
    apps: Dictionary of key=lang, value=[Application].
    file: The input file to be stamped.
    applytag_exe_name: The full path to applytag_exe_name.
  """
  if not apps:
    return
  for apps_lang in apps:
    for app in apps[apps_lang]:
      TagOneFile(file, app, applytag_exe_name)

def PrintUsage():
  print ''
  print 'Tool to stamp the Guid, Application name, needs admin into the'
  print 'meta-installer.'
  print 'Reads <installer file> which contains the application name,'
  print 'guid, needs_admin and stamps the meta-installer <file> with'
  print 'these values.'
  print 'For an example of the <installer file> take a look at'
  print '#/installers/googlegears_installer.txt'
  print ''
  print ('tag_meta_installers.py <applytag> <input file> <installer file>'
        '<output file>')

def main():
  if len(sys.argv) != 5:
    PrintUsage()
    return

  apply_tag_exe = sys.argv[1]
  input_file = sys.argv[2]
  file_name = sys.argv[3]
  output_dir = sys.argv[4]

  if not os.path.exists(apply_tag_exe):
    print "Could not find applytag.exe"
    PrintUsage()
    return

  if not os.path.exists(file_name):
    print "Invalid filename %s" % file_name
    PrintUsage()
    return

  if not os.path.exists(input_file):
    print "Invalid directory %s" % input_file
    PrintUsage()
    return

  if not os.path.exists(output_dir):
    os.mkdir(output_dir)

  # Read in the installers.txt file.
  apps = ReadBundleInstallerFile(file_name)

  SetOutputFileNames(input_file, apps, output_dir)
  TagBinary(apps, input_file, apply_tag_exe)

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


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

import os
from codecs import open

# with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
#     long_description = f.read()

setup(
    name='filter_variants',

    # Versions should comply with PEP440. For a discussion on
    # single-sourcing the version across setup.py and the project code,
    # see http://packaging.python.org/en/latest/tutorial.html#version
    version='0.3',

    description='Filter variants based on frequencies',
    # long_description=long_description,
    # What does your project relate to? Separate with spaces.
    keywords='sequencing exome genome',
    author='Måns Magnusson',
    author_email='mans.magnusson@scilifelab.se',
    license='MIT',

    # The project's main homepage
    url='https://github.com/moonso/filter_variants',

    packages=find_packages(exclude=('tests*', 'docs', 'examples')),

    # If there are data files included in your packages that need to be
    # installed, specify them here.
    include_package_data=True,
    zip_safe=False,

    install_requires=[
        'click',
        'setuptools',
        'pytabix',
        'vcftoolbox',
        'extract_vcf',
    ],
    tests_require=[
        'pytest',
    ],

    # To provide executable scripts, use entry points in preference to the
    # "scripts" keyword. Entry points provide cross-platform support and
    # allow pip to create the appropriate form of executable for the
    # target platform.
    entry_points={
        'console_scripts': [
            'filter_variants = filter_variants.cli.root:cli',
        ],
    },

    # See: http://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=[
        # How mature is this project? Common values are:
        #   3 - Alpha
        #   4 - Beta
        #   5 - Production/Stable
        'Development Status :: 3 - Alpha',

        # Indicate who your project is intended for
        'Intended Audience :: Science/Research',
        'Topic :: Software Development',
        'Topic :: Scientific/Engineering :: Bio-Informatics',

        # Pick your license as you wish (should match "license" above)
        'License :: OSI Approved :: MIT License',

        # Specify the Python versions you support here. In particular, ensure
        # that you indicate whether you support Python 2, Python 3 or both.
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',

        'Environment :: Console',
    ],
)
<commit_msg>Added publish<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os

try:
    from setuptools import setup, find_packages
except ImportError:
    from distutils.core import setup

import pkg_resources
from codecs import open

# Shortcut for building/publishing to Pypi
if sys.argv[-1] == 'publish':
    os.system('python setup.py sdist bdist_wheel upload')
    sys.exit()

# with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
#     long_description = f.read()

setup(
    name='filter_variants',

    # Versions should comply with PEP440. For a discussion on
    # single-sourcing the version across setup.py and the project code,
    # see http://packaging.python.org/en/latest/tutorial.html#version
    version='0.3',

    description='Filter variants based on frequencies',
    # long_description=long_description,
    # What does your project relate to? Separate with spaces.
    keywords='sequencing exome genome',
    author='Måns Magnusson',
    author_email='mans.magnusson@scilifelab.se',
    license='MIT',

    # The project's main homepage
    url='https://github.com/moonso/filter_variants',

    packages=find_packages(exclude=('tests*', 'docs', 'examples')),

    # If there are data files included in your packages that need to be
    # installed, specify them here.
    include_package_data=True,
    zip_safe=False,

    install_requires=[
        'click',
        'setuptools',
        'pytabix',
        'vcftoolbox',
        'extract_vcf',
    ],
    tests_require=[
        'pytest',
    ],

    # To provide executable scripts, use entry points in preference to the
    # "scripts" keyword. Entry points provide cross-platform support and
    # allow pip to create the appropriate form of executable for the
    # target platform.
    entry_points={
        'console_scripts': [
            'filter_variants = filter_variants.cli.root:cli',
        ],
    },

    # See: http://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=[
        # How mature is this project? Common values are:
        #   3 - Alpha
        #   4 - Beta
        #   5 - Production/Stable
        'Development Status :: 3 - Alpha',

        # Indicate who your project is intended for
        'Intended Audience :: Science/Research',
        'Topic :: Software Development',
        'Topic :: Scientific/Engineering :: Bio-Informatics',

        # Pick your license as you wish (should match "license" above)
        'License :: OSI Approved :: MIT License',

        # Specify the Python versions you support here. In particular, ensure
        # that you indicate whether you support Python 2, Python 3 or both.
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',

        'Environment :: Console',
    ],
)
<|endoftext|>


<commit_before>import ez_setup
ez_setup.use_setuptools()

from setuptools import setup, find_packages

version = '1.0.1'

setup(name='ZopeSkel',
      version=version,
      description="A collection of skeletons for quickstarting Zope projects.",
      long_description=open('README.txt').read(),
      classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Framework :: Zope2",
        "Framework :: Zope3",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Programming Language :: Python",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
        "Topic :: Software Development :: Libraries :: Python Modules",
        ],
      keywords='web zope command-line skeleton project',
      author='Daniel Nouri',
      author_email='daniel.nouri@gmail.com',
      url='',
      packages=find_packages(exclude=['ez_setup']),
      include_package_data=True,
      zip_safe=False,
      install_requires=[
        "PasteScript",
        "Cheetah",
      ],
      entry_points="""
      [paste.paster_create_template]
      basic_namespace = zopeskel:Namespace
      nested_namespace = zopeskel:NestedNamespace
      basic_zope = zopeskel:BasicZope
      plone = zopeskel:Plone
      plone_app = zopeskel:PloneApp
      plone2_theme = zopeskel:Plone2Theme
      plone2.5_theme = zopeskel:Plone25Theme
      plone3_theme = zopeskel:Plone3Theme
      plone2.5_buildout = zopeskel:Plone25Buildout
      plone3_buildout = zopeskel:Plone3Buildout
      """,
      )
<commit_msg>Archetype entry point. Forgot to commit this earlier.<commit_after>import ez_setup
ez_setup.use_setuptools()

from setuptools import setup, find_packages

version = '1.0.1'

setup(name='ZopeSkel',
      version=version,
      description="A collection of skeletons for quickstarting Zope projects.",
      long_description=open('README.txt').read(),
      classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Framework :: Zope2",
        "Framework :: Zope3",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Programming Language :: Python",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
        "Topic :: Software Development :: Libraries :: Python Modules",
        ],
      keywords='web zope command-line skeleton project',
      author='Daniel Nouri',
      author_email='daniel.nouri@gmail.com',
      url='',
      packages=find_packages(exclude=['ez_setup']),
      include_package_data=True,
      zip_safe=False,
      install_requires=[
        "PasteScript",
        "Cheetah",
      ],
      entry_points="""
      [paste.paster_create_template]
      basic_namespace = zopeskel:Namespace
      nested_namespace = zopeskel:NestedNamespace
      basic_zope = zopeskel:BasicZope
      plone = zopeskel:Plone
      plone_app = zopeskel:PloneApp
      plone2_theme = zopeskel:Plone2Theme
      plone2.5_theme = zopeskel:Plone25Theme
      plone3_theme = zopeskel:Plone3Theme
      plone2.5_buildout = zopeskel:Plone25Buildout
      plone3_buildout = zopeskel:Plone3Buildout
      archetype = zopeskel:Archetype
      """,
      )
<|endoftext|>


<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#The MIT License (MIT)
#
#Copyright (c) <2013> <Colin Duquesnoy and others, see AUTHORS.txt>
#
#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.
#
"""
Setup script for pyqode.core
"""
try:
    from setuptools import setup, find_packages
except ImportError:
    import ez_setup
    ez_setup.use_setuptools()
    from setuptools import setup, find_packages

def read_version():
    with open("pyqode/core/__init__.py") as f:
        lines = f.read().splitlines()
        for l in lines:
            if "__version__" in l:
                return l.split("=")[1].strip().replace('"', '')

print(read_version())

def readme():
    return str(open('README.rst').read())

# get requirements
requirements = ['pygments']

packages = find_packages()
setup(
    name='pyqode.core',
    namespace_packages=['pyqode'],
    version=read_version(),
    packages=packages,
    keywords=["QCodeEdit PySide PyQt code editor widget"],
    package_data={'pyqode.core.ui': ['*.ui', '*.qrc', 'rc/*']},
    #package_dir={'pyqode': 'pyqode', "pyqode_designer":},
    url='https://github.com/ColinDuquesnoy/pyqode.core',
    license='MIT',
    author='Colin Duquesnoy',
    author_email='colin.duquesnoy@gmail.com',
    description='Python/Qt Code Editor widget',
    long_description=readme(),
    install_requires=requirements,
    entry_points={'pyqode_plugins':
                  ['pyqode_core = pyqode.core.plugins.pyqode_core_plugin']},
    zip_safe=False,
    classifiers=[
          'Development Status :: 5 - Production/Stable',
          'Environment :: X11 Applications :: Qt',
          'Environment :: Win32 (MS Windows)',
          'Framework :: pyqode',
          'Intended Audience :: Developers',
          'License :: OSI Approved :: MIT License',
          'Operating System :: Microsoft :: Windows',
          'Operating System :: POSIX :: Linux',
          'Programming Language :: Python :: 2.7',
          'Programming Language :: Python :: 3.2',
          'Programming Language :: Python :: 3.3',
          'Topic :: Software Development :: Libraries :: Application Frameworks',
          'Topic :: Software Development :: Widget Sets',
          'Topic :: Text Editors :: Integrated Development Environments (IDE)'])
<commit_msg>Remove invalid classifier<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#The MIT License (MIT)
#
#Copyright (c) <2013> <Colin Duquesnoy and others, see AUTHORS.txt>
#
#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.
#
"""
Setup script for pyqode.core
"""
try:
    from setuptools import setup, find_packages
except ImportError:
    import ez_setup
    ez_setup.use_setuptools()
    from setuptools import setup, find_packages

def read_version():
    with open("pyqode/core/__init__.py") as f:
        lines = f.read().splitlines()
        for l in lines:
            if "__version__" in l:
                return l.split("=")[1].strip().replace('"', '')

print(read_version())

def readme():
    return str(open('README.rst').read())

# get requirements
requirements = ['pygments']

packages = find_packages()
setup(
    name='pyqode.core',
    namespace_packages=['pyqode'],
    version=read_version(),
    packages=packages,
    keywords=["QCodeEdit PySide PyQt code editor widget"],
    package_data={'pyqode.core.ui': ['*.ui', '*.qrc', 'rc/*']},
    #package_dir={'pyqode': 'pyqode', "pyqode_designer":},
    url='https://github.com/ColinDuquesnoy/pyqode.core',
    license='MIT',
    author='Colin Duquesnoy',
    author_email='colin.duquesnoy@gmail.com',
    description='Python/Qt Code Editor widget',
    long_description=readme(),
    install_requires=requirements,
    entry_points={'pyqode_plugins':
                  ['pyqode_core = pyqode.core.plugins.pyqode_core_plugin']},
    zip_safe=False,
    classifiers=[
          'Development Status :: 5 - Production/Stable',
          'Environment :: X11 Applications :: Qt',
          'Environment :: Win32 (MS Windows)',
          'Intended Audience :: Developers',
          'License :: OSI Approved :: MIT License',
          'Operating System :: Microsoft :: Windows',
          'Operating System :: POSIX :: Linux',
          'Programming Language :: Python :: 2.7',
          'Programming Language :: Python :: 3.2',
          'Programming Language :: Python :: 3.3',
          'Topic :: Software Development :: Libraries :: Application Frameworks',
          'Topic :: Software Development :: Widget Sets',
          'Topic :: Text Editors :: Integrated Development Environments (IDE)'])
<|endoftext|>


<commit_before>from __future__ import absolute_import

import os
import re

from setuptools import find_packages, setup

def get_version(filename):
    with open(filename, "r") as fp:
        contents = fp.read()
    return re.search(r"__version__ = ['\"]([^'\"]+)['\"]", contents).group(1)

version = get_version(os.path.join("multilint", "__init__.py"))

with open("README.rst", "r") as readme_file:
    readme = readme_file.read()

with open("HISTORY.rst", "r") as history_file:
    history = history_file.read()

setup(
    name="multilint",
    version=version,
    description="Run multiple python linters easily",
    long_description=readme + "\n\n" + history,
    author="Adam Johnson",
    author_email="me@adamj.eu",
    url="https://github.com/adamchainz/multilint",
    packages=find_packages(exclude=["tests", "tests.*"]),
    include_package_data=True,
    install_requires=[],
    python_requires=">=3.5",
    license="ISC license",
    zip_safe=False,
    entry_points={"console_scripts": ["multilint = multilint:main"]},
    keywords="lint, flake8, pep8, pycodestyle, codestyle, mccabe, setup.py",
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: ISC License (ISCL)",
        "Natural Language :: English",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
    ],
)
<commit_msg>Add PyPI changelog link (#125)<commit_after>from __future__ import absolute_import

import os
import re

from setuptools import find_packages, setup

def get_version(filename):
    with open(filename, "r") as fp:
        contents = fp.read()
    return re.search(r"__version__ = ['\"]([^'\"]+)['\"]", contents).group(1)

version = get_version(os.path.join("multilint", "__init__.py"))

with open("README.rst", "r") as readme_file:
    readme = readme_file.read()

with open("HISTORY.rst", "r") as history_file:
    history = history_file.read()

setup(
    name="multilint",
    version=version,
    description="Run multiple python linters easily",
    long_description=readme + "\n\n" + history,
    author="Adam Johnson",
    author_email="me@adamj.eu",
    url="https://github.com/adamchainz/multilint",
    project_urls={
        "Changelog": "https://github.com/adamchainz/multilint/blob/master/HISTORY.rst"
    },
    packages=find_packages(exclude=["tests", "tests.*"]),
    include_package_data=True,
    install_requires=[],
    python_requires=">=3.5",
    license="ISC license",
    zip_safe=False,
    entry_points={"console_scripts": ["multilint = multilint:main"]},
    keywords="lint, flake8, pep8, pycodestyle, codestyle, mccabe, setup.py",
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: ISC License (ISCL)",
        "Natural Language :: English",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
    ],
)
<|endoftext|>


<commit_before># -*- coding: utf-8 -*-
#
# Copyright (C) 2015 McKinsey Academy
#
# Authors:
#          Jonathan Piacenti <jonathan@opencraft.com>
#
# This software's license gives you freedom; you can copy, convey,
# propagate, redistribute and/or modify this program under the terms of
# the GNU Affero General Public License (AGPL) as published by the Free
# Software Foundation (FSF), either version 3 of the License, or (at your
# option) any later version of the AGPL published by the FSF.
#
# This program 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 Affero
# General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program in a file in the toplevel directory called
# "AGPLv3".  If not, see <http://www.gnu.org/licenses/>.
#
"""Setup for poll XBlock."""

import os
from setuptools import setup

def package_data(pkg, roots):
    """Generic function to find package_data.

    All of the files under each of the `roots` will be declared as package
    data for package `pkg`.

    """
    data = []
    for root in roots:
        for dirname, _, files in os.walk(os.path.join(pkg, root)):
            for fname in files:
                data.append(os.path.relpath(os.path.join(dirname, fname), pkg))

    return {pkg: data}

setup(
    name='xblock-checkpoll',
    version='0.2',
    description='An XBlock for polling users.',
    packages=[
        'checkpoll',
    ],
    install_requires=[
        'XBlock',
        'markdown',
        'xblock-utils',
        'ddt',
        'mock',
    ],
    dependency_links=['http://github.com/edx-solutions/xblock-utils/tarball/master#egg=xblock-utils'],
    entry_points={
        'xblock.v1': [
            'checkpoll = checkpoll:CheckPollBlock',
        ]
    },
    package_data=package_data("checkpoll", ["static", "public"]),
)
<commit_msg>Added poll and survey<commit_after># -*- coding: utf-8 -*-
#
# Copyright (C) 2015 McKinsey Academy
#
# Authors:
#          Jonathan Piacenti <jonathan@opencraft.com>
#
# This software's license gives you freedom; you can copy, convey,
# propagate, redistribute and/or modify this program under the terms of
# the GNU Affero General Public License (AGPL) as published by the Free
# Software Foundation (FSF), either version 3 of the License, or (at your
# option) any later version of the AGPL published by the FSF.
#
# This program 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 Affero
# General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program in a file in the toplevel directory called
# "AGPLv3".  If not, see <http://www.gnu.org/licenses/>.
#
"""Setup for poll XBlock."""

import os
from setuptools import setup

def package_data(pkg, roots):
    """Generic function to find package_data.

    All of the files under each of the `roots` will be declared as package
    data for package `pkg`.

    """
    data = []
    for root in roots:
        for dirname, _, files in os.walk(os.path.join(pkg, root)):
            for fname in files:
                data.append(os.path.relpath(os.path.join(dirname, fname), pkg))

    return {pkg: data}

setup(
    name='xblock-poll',
    version='0.2',
    description='An XBlock for polling users.',
    packages=[
        'checkpoll',
    ],
    install_requires=[
        'XBlock',
        'markdown',
        'xblock-utils',
        'ddt',
        'mock',
    ],
    dependency_links=['http://github.com/edx-solutions/xblock-utils/tarball/master#egg=xblock-utils'],
    entry_points={
        'xblock.v1': [
            'checkpoll = checkpoll:CheckPollBlock',
            'poll = checkpoll:PollBlock',
            'survey = checkpoll:SurveyBlock',
        ]
    },
    package_data=package_data("checkpoll", ["static", "public"]),
)
<|endoftext|>


<commit_before>import os

from setuptools import setup, find_packages

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

setup(name='jaspyx',
      version='0.0',
      description='JavaScript expressed in Python',
      classifiers=[
      	  "Programming Language :: Python",
      ],
      author='Ingmar Steen',
      author_email='iksteen@gmail.com',
      url='http://thegraveyard.org/',
      packages=find_packages(),
      scripts=['jaspyxc'],
      include_package_data=True,
      zip_safe=False,
)
<commit_msg>Reference README.md instead of README.txt in setup.py.<commit_after>import os

from setuptools import setup, find_packages

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

setup(name='jaspyx',
      version='0.0',
      description='JavaScript expressed in Python',
      classifiers=[
      	  "Programming Language :: Python",
      ],
      author='Ingmar Steen',
      author_email='iksteen@gmail.com',
      url='http://thegraveyard.org/',
      packages=find_packages(),
      scripts=['jaspyxc'],
      include_package_data=True,
      zip_safe=False,
)
<|endoftext|>


<commit_before>#!/usr/bin/env python

from setuptools import setup

setup(
    name='http-cmd',
    version='0.1-dev',
    url='https://github.com/lodevil/http-cmd',
    license='Apache License 2.0',
    author='lolynx',
    author_email='londevil@gmail.com',
    description='a library to simplify some simple'
                ' cmd interaction (http based)',
    packages=['httpcmd'],
    platforms='any',
    install_requires=[
        'flask>0.10',
        'requests>2.0',
    ],
    entry_points='''
        [console_scripts]
        httpcmd=httpcmd.cli:main
    '''
)
<commit_msg>version up<commit_after>#!/usr/bin/env python

from setuptools import setup

setup(
    name='http-cmd',
    version='0.1',
    url='https://github.com/lodevil/http-cmd',
    license='Apache License 2.0',
    author='lolynx',
    author_email='londevil@gmail.com',
    description='a library to simplify some simple'
                ' cmd interaction (http based)',
    packages=['httpcmd'],
    platforms='any',
    install_requires=[
        'flask>0.10',
        'requests>2.0',
    ],
    entry_points='''
        [console_scripts]
        httpcmd=httpcmd.cli:main
    '''
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
# Copyright (c) 2012-2013 Ivan Zakrevsky, Jared Kuolt and contributors
import os.path
from setuptools import setup, find_packages

setup(
    name='ascetic',
    version='0.7.2.17',

    packages = find_packages(),
    include_package_data=True,

    author="Ivan Zakrevsky",
    author_email="ivzak@yandex.ru",
    description="Lightweight python datamapper ORM (Object-relational mapper).",
    long_description=open(os.path.join(os.path.dirname(__file__), 'README.rst')).read(),
    url="https://bitbucket.org/emacsway/ascetic",
    license="MIT License",
    keywords = "ORM Database SQL",
    install_requires=[
        'sqlbuilder >= 0.7.9.9'
    ],
    classifiers = [
        'Development Status :: 1 - Planning',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
)
<commit_msg>0.7.2.18<commit_after>#!/usr/bin/env python
# Copyright (c) 2012-2013 Ivan Zakrevsky, Jared Kuolt and contributors
import os.path
from setuptools import setup, find_packages

setup(
    name='ascetic',
    version='0.7.2.18',

    packages = find_packages(),
    include_package_data=True,

    author="Ivan Zakrevsky",
    author_email="ivzak@yandex.ru",
    description="Lightweight python datamapper ORM (Object-relational mapper).",
    long_description=open(os.path.join(os.path.dirname(__file__), 'README.rst')).read(),
    url="https://bitbucket.org/emacsway/ascetic",
    license="MIT License",
    keywords = "ORM Database SQL",
    install_requires=[
        'sqlbuilder >= 0.7.9.9'
    ],
    classifiers = [
        'Development Status :: 1 - Planning',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
)
<|endoftext|>


<commit_before># Copyright 2016 Jon Wayne Parrott
#
# 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 codecs import open

from setuptools import setup

long_description = open('README.rst', 'r', encoding='utf-8').read()

setup(
    name='nox-automation',

    version='0.14.0',

    description='Flexible test automation.',
    long_description=long_description,

    url='https://nox.readthedocs.org',

    author='Jon Wayne Parrott',
    author_email='jonwayne@google.com',

    license='Apache Software License',

    classifiers=[
        'Development Status :: 4 - Beta',

        'Intended Audience :: Developers',

        'License :: OSI Approved :: Apache Software License',

        'Topic :: Software Development :: Testing',
        'Environment :: Console',

        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',

        'Operating System :: POSIX',
        'Operating System :: MacOS',
        'Operating System :: Unix',
        'Operating System :: Microsoft :: Windows'
    ],

    keywords='testing automation tox',

    packages=['nox'],

    include_package_data=True,

    install_requires=[
        'colorlog>=2.6.1,<3.0.0',
        'py>=1.4.0,<2.0.0',
        'six>=1.4.0,<2.0.0',
        'virtualenv>=14.0.0'],

    extras_require={
        'tox-to-nox': ['jinja2', 'tox']
    },

    entry_points={
        'console_scripts': [
            'nox=nox.main:main',
            'tox-to-nox=nox.tox_to_nox:main [tox-to-nox]'
        ],
    },
)
<commit_msg>Fix bad specifier and release v0.15.0<commit_after># Copyright 2016 Jon Wayne Parrott
#
# 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 codecs import open

from setuptools import setup

long_description = open('README.rst', 'r', encoding='utf-8').read()

setup(
    name='nox-automation',

    version='0.15.0',

    description='Flexible test automation.',
    long_description=long_description,

    url='https://nox.readthedocs.org',

    author='Jon Wayne Parrott',
    author_email='jonwayne@google.com',

    license='Apache Software License',

    classifiers=[
        'Development Status :: 4 - Beta',

        'Intended Audience :: Developers',

        'License :: OSI Approved :: Apache Software License',

        'Topic :: Software Development :: Testing',
        'Environment :: Console',

        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',

        'Operating System :: POSIX',
        'Operating System :: MacOS',
        'Operating System :: Unix',
        'Operating System :: Microsoft :: Windows'
    ],

    keywords='testing automation tox',

    packages=['nox'],

    include_package_data=True,

    install_requires=[
        'colorlog>=2.6.1,<3.0.0',
        'py>=1.4.0,<2.0.0',
        'six>=1.4.0,<2.0.0',
        'virtualenv>=14.0.0'],

    extras_require={
        'tox_to_nox': ['jinja2', 'tox']
    },

    entry_points={
        'console_scripts': [
            'nox=nox.main:main',
            'tox-to-nox=nox.tox_to_nox:main [tox_to_nox]'
        ],
    },
)
<|endoftext|>


<commit_before># Copyright 2022 The MT3 Authors.
#
# 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.

# Lint as: python3
"""Install mt3."""

import os
import sys
import setuptools

# To enable importing version.py directly, we add its path to sys.path.
version_path = os.path.join(os.path.dirname(__file__), 'mt3')
sys.path.append(version_path)
from version import __version__  # pylint: disable=g-import-not-at-top

setuptools.setup(
    name='mt3',
    version=__version__,
    description='Multi-Task Multitrack Music Transcription',
    author='Google Inc.',
    author_email='no-reply@google.com',
    url='http://github.com/magenta/mt3',
    license='Apache 2.0',
    packages=setuptools.find_packages(),
    package_data={
        '': ['*.gin'],
    },
    scripts=[],
    install_requires=[
        'absl-py',
        'ddsp',
        'flax',
        'gin-config',
        'immutabledict',
        'librosa',
        'mir_eval',
        'note_seq',
        'numpy',
        'pretty_midi',
        'scikit-learn',
        'scipy',
        'seqio',
        't5',
        'tensorflow',
        'tensorflow-datasets',
    ],
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: Apache Software License',
        'Topic :: Scientific/Engineering :: Artificial Intelligence',
    ],
    tests_require=['pytest'],
    setup_requires=['pytest-runner'],
    keywords='music transcription machinelearning audio',
)
<commit_msg>Remove unused comments related to Python 2 compatibility.<commit_after># Copyright 2022 The MT3 Authors.
#
# 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.

"""Install mt3."""

import os
import sys
import setuptools

# To enable importing version.py directly, we add its path to sys.path.
version_path = os.path.join(os.path.dirname(__file__), 'mt3')
sys.path.append(version_path)
from version import __version__  # pylint: disable=g-import-not-at-top

setuptools.setup(
    name='mt3',
    version=__version__,
    description='Multi-Task Multitrack Music Transcription',
    author='Google Inc.',
    author_email='no-reply@google.com',
    url='http://github.com/magenta/mt3',
    license='Apache 2.0',
    packages=setuptools.find_packages(),
    package_data={
        '': ['*.gin'],
    },
    scripts=[],
    install_requires=[
        'absl-py',
        'ddsp',
        'flax',
        'gin-config',
        'immutabledict',
        'librosa',
        'mir_eval',
        'note_seq',
        'numpy',
        'pretty_midi',
        'scikit-learn',
        'scipy',
        'seqio',
        't5',
        'tensorflow',
        'tensorflow-datasets',
    ],
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: Apache Software License',
        'Topic :: Scientific/Engineering :: Artificial Intelligence',
    ],
    tests_require=['pytest'],
    setup_requires=['pytest-runner'],
    keywords='music transcription machinelearning audio',
)
<|endoftext|>


<commit_before>from setuptools import setup

setup(
    name='img_rotate',
    version='0.1',
    description="""Rotates PIL Image instances after EXIF-tagged image orientation""",
    url="https://github.com/kylefox/python-image-orientation-patch",
    author="Kyle Fox",
    author_email="kyle.fox@gmail.com",
    license="MIT",
    packages=['img_rotate'],
    scripts=['bin/img_rotate'],
    zip_safe=False,
)
<commit_msg>Bump to v0.1.1<commit_after>from setuptools import setup

setup(
    name='img_rotate',
    version='0.1.1',
    description="""Rotates PIL Image instances after EXIF-tagged image orientation""",
    url="https://github.com/kylefox/python-image-orientation-patch",
    author="Kyle Fox",
    author_email="kyle.fox@gmail.com",
    license="MIT",
    packages=['img_rotate'],
    scripts=['bin/img_rotate'],
    zip_safe=False,
)
<|endoftext|>


<commit_before>from distutils.core import setup

setup(name='twittytwister',
    version='0.1',
    description='Twitter client for Twisted Python',
    author='Dustin Sallings',
    author_email='dustin@spy.net',
    url='http://github.com/dustin/twitty-twister/',
    license='MIT',
    platforms='any',
    packages=['twittytwister'],
)
<commit_msg>use setuptools, version bump to 0.1.1, install dependencies<commit_after>from setuptools import setup

setup(name='twittytwister',
    version='0.1.1',
    description='Twitter client for Twisted Python',
    author='Dustin Sallings',
    author_email='dustin@spy.net',
    url='http://github.com/dustin/twitty-twister/',
    license='MIT',
    platforms='any',
    packages=['twittytwister'],
    install_requires=[
        'oauth',
        'simplejson',
        'Twisted',
    ]
)
<|endoftext|>


<commit_before>__author__ = 'lobocv'

from distutils.core import setup
from anonymoususage import __version__

setup(
    name='anonymoususage',
    packages=['anonymoususage'],  # this must be the same as the name above
    version=__version__,
    description='Anonymously track user usage patterns and statistics.',
    author='Calvin Lobo',
    author_email='calvinvlobo@gmail.com',
    url='https://github.com/lobocv/anonymoususage',
    download_url='https://github.com/lobocv/anonymoususage/tarball/%s' % __version__,
    keywords=['logging', 'usage', 'tracking', 'statistics', 'anonymous'],
    classifiers=[],
    install_requires=['sqlite3', 'matplotlib']
)
<commit_msg>fixed setup.py to include submodules tables and analysis<commit_after>__author__ = 'lobocv'

import os
from setuptools import setup
from anonymoususage import __version__

setup(
    name='anonymoususage',
    packages=['anonymoususage', 'anonymoususage.tables', 'anonymoususage.analysis'],  # this must be the same as the name above
    version=__version__,
    description='Anonymously track user usage patterns and statistics.',
    author='Calvin Lobo',
    author_email='calvinvlobo@gmail.com',
    url='https://github.com/lobocv/anonymoususage',
    download_url='https://github.com/lobocv/anonymoususage/tarball/%s' % __version__,
    keywords=['logging', 'usage', 'tracking', 'statistics', 'anonymous'],
    classifiers=[],
    install_requires=['sqlite3', 'matplotlib']
)
<|endoftext|>


<commit_before># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from codecs import open
from os import path

here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
    long_description = f.read()

setup(
    name='totvserprm',
    version='1.7.0',
    description='API para webservices do TOTVS ERP RM',
    url='https://github.com/grupoandrademartins/totvserprm',
    author='Rafael G. Winter, Túlio Cesar Martins',
    author_email='totvs-erp-rm-python@googlegroups.com',
    license='MIT',
    packages=find_packages(exclude=['contrib', 'docs', 'tests']),
    install_requires=[
      'dicttoxml',
      'lxml',
      'requests',
      'zeep'
    ],
    keywords='totvs webservice erp rm soap api',
    long_description=long_description
)
<commit_msg>change version<commit_after># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from codecs import open
from os import path

here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
    long_description = f.read()

setup(
    name='totvserprm',
    version='1.7.1',
    description='API para webservices do TOTVS ERP RM',
    url='https://github.com/grupoandrademartins/totvserprm',
    author='Rafael G. Winter, Túlio Cesar Martins',
    author_email='totvs-erp-rm-python@googlegroups.com',
    license='MIT',
    packages=find_packages(exclude=['contrib', 'docs', 'tests']),
    install_requires=[
      'dicttoxml',
      'lxml',
      'requests',
      'zeep'
    ],
    keywords='totvs webservice erp rm soap api',
    long_description=long_description
)
<|endoftext|>


<commit_before># -*- coding: utf-8 -*-
import os
from setuptools import setup, find_packages

# Vagrant / tox workaround (http://bugs.python.org/issue8876#msg208792)
if os.environ.get('USER','') == 'vagrant':
    del os.link

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

with open(os.path.join(root, 'README.rst')) as f:
    README = f.read()

setup(
    name='django-badgify',
    version='0.2.1',
    description='Badges app for Django',
    long_description=README,
    author='Gilles Fabio',
    author_email='gilles.fabio@gmail.com',
    url='http://github.com/ulule/django-badgify',
    packages=find_packages(),
    zip_safe=False,
    include_package_data=True,
    classifiers=[
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Utilities',
    ]
)
<commit_msg>Clean version.<commit_after># -*- coding: utf-8 -*-
import os
from setuptools import setup, find_packages

# Vagrant / tox workaround (http://bugs.python.org/issue8876#msg208792)
if os.environ.get('USER','') == 'vagrant':
    del os.link

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

with open(os.path.join(root, 'README.rst')) as f:
    README = f.read()

setup(
    name='django-badgify',
    version='0.1.0',
    description='Badges app for Django',
    long_description=README,
    author='Gilles Fabio',
    author_email='gilles.fabio@gmail.com',
    url='http://github.com/ulule/django-badgify',
    packages=find_packages(),
    zip_safe=False,
    include_package_data=True,
    classifiers=[
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Utilities',
    ]
)
<|endoftext|>


<commit_before># -*- coding: utf-8 -*-

import os

from setuptools import setup, find_packages

here = os.path.dirname(__file__)
requires = [
    'PyCrypto',
]
tests_require = [
    'nose',
    'coverage'
]

def _read(name):
    try:
        return open(os.path.join(here, name)).read()
    except:
        return ""
readme = _read("README.rst")
license = _read("LICENSE.rst")

setup(
    name='jwt',
    version='0.2.1',
    test_suite='jwt',
    author='Kohei YOSHIDA',
    author_email='kohei.yoshida@gehirn.co.jp',
    description='JSON Web Token library for Python 3.',
    long_description=readme,
    license=license,
    url='https://github.com/GehirnInc/python-jwt',
    packages=find_packages(),
    install_requires=requires,
    tests_require=tests_require,
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3.3",
        "Programming Language :: Python :: 3.4",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Security",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
)
<commit_msg>v0.2.2<commit_after># -*- coding: utf-8 -*-

import os

from setuptools import setup, find_packages

here = os.path.dirname(__file__)
requires = [
    'PyCrypto',
]
tests_require = [
    'nose',
    'coverage'
]

def _read(name):
    try:
        return open(os.path.join(here, name)).read()
    except:
        return ""
readme = _read("README.rst")
license = _read("LICENSE.rst")

setup(
    name='jwt',
    version='0.2.2',
    test_suite='jwt',
    author='Kohei YOSHIDA',
    author_email='kohei.yoshida@gehirn.co.jp',
    description='JSON Web Token library for Python 3.',
    long_description=readme,
    license=license,
    url='https://github.com/GehirnInc/python-jwt',
    packages=find_packages(),
    install_requires=requires,
    tests_require=tests_require,
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3.3",
        "Programming Language :: Python :: 3.4",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Security",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
)
<|endoftext|>


<commit_before>from setuptools import setup, find_packages
from codecs import open
from os import path

here = path.abspath(path.dirname(__file__))

# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
	long_description = f.read()

setup(
	name='checkPy',

	version='0.2.6',

	description='A simple python testing framework for educational purposes',
	long_description=long_description,

	url='https://github.com/Jelleas/CheckPy',

	author='Jelleas',
	author_email='jelle.van.assema@gmail.com',

	license='MIT',

	# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
	classifiers=[
		'Development Status :: 3 - Alpha',

		'Intended Audience :: Education',
		'Topic :: Education :: Testing',

		'License :: OSI Approved :: MIT License',

		'Programming Language :: Python :: 2',
		'Programming Language :: Python :: 2.7',
	],

	keywords='new unexperienced programmers automatic testing minor programming',

	packages=find_packages(exclude=[]),

	include_package_data=True,

	install_requires=["requests"],

	extras_require={
		'dev': [],
		'test': [],
	},

	package_data={
	},

	data_files=[],

	entry_points={
		'console_scripts': [
			'checkpy=checkpy.__main__:main',
		],
	},
)
<commit_msg>version 0.2.7<commit_after>from setuptools import setup, find_packages
from codecs import open
from os import path

here = path.abspath(path.dirname(__file__))

# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
	long_description = f.read()

setup(
	name='checkPy',

	version='0.2.7',

	description='A simple python testing framework for educational purposes',
	long_description=long_description,

	url='https://github.com/Jelleas/CheckPy',

	author='Jelleas',
	author_email='jelle.van.assema@gmail.com',

	license='MIT',

	# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
	classifiers=[
		'Development Status :: 3 - Alpha',

		'Intended Audience :: Education',
		'Topic :: Education :: Testing',

		'License :: OSI Approved :: MIT License',

		'Programming Language :: Python :: 2',
		'Programming Language :: Python :: 2.7',
	],

	keywords='new unexperienced programmers automatic testing minor programming',

	packages=find_packages(exclude=[]),

	include_package_data=True,

	install_requires=["requests"],

	extras_require={
		'dev': [],
		'test': [],
	},

	package_data={
	},

	data_files=[],

	entry_points={
		'console_scripts': [
			'checkpy=checkpy.__main__:main',
		],
	},
)
<|endoftext|>


<commit_before># Copyright 2020 The HuggingFace Team. All rights reserved.
#
# 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.

"""
Simple check list from AllenNLP repo: https://github.com/allenai/allennlp/blob/master/setup.py

To create the package for pypi.

1. Change the version in __init__.py, setup.py as well as docs/source/conf.py. Remove the master from the links in
   the new models of the README:
   (https://huggingface.co/transformers/master/model_doc/ -> https://huggingface.co/transformers/model_doc/)
   then run `make fix-copies` to fix the index of the documentation.

2. Unpin specific versions from setup.py that use a git install.

2. Commit these changes with the message: "Release: VERSION"

3. Add a tag in git to mark the release: "git tag VERSION -m 'Adds tag VERSION for pypi' "
   Push the tag to git: git push --tags origin master

4. Build both the sources and the wheel. Do not change anything in setup.py between
   creating the wheel and the source distribution (obviously).

   For the wheel, run: "python setup.py bdist_wheel" in the top level directory.
   (this will build a wheel for the python version you use to build it).

   For the sources, run: "python setup.py sdist"
   You should now have a /dist directory with both .whl and .tar.gz source versions.

5. Check that everything looks correct by uploading the package to the pypi test server:

   twine upload dist/* -r pypitest
   (pypi suggest using twine as other methods upload files via plaintext.)
   You may have to specify the repository url, use the following command then:
   twine upload dist/* -r pypitest --repository-url=https://test.pypi.org/legacy/

   Check that you can install it in a virtualenv by running:
   pip install -i https://testpypi.python.org/pypi transformers

6. Upload the final version to actual pypi:
   twine upload dist/* -r pypi

7. Copy the release notes from RELEASE.md to the tag in github once everything is looking hunky-dory.

8. Add the release version to docs/source/_static/js/custom.js and .circleci/deploy.sh

9. Update README.md to redirect to correct documentation.

10. Update the version in __init__.py, setup.py to the new version "-dev" and push to master.
"""

import os
import re
import shutil
from distutils.core import Command
from pathlib import Path

from setuptools import find_packages, setup

# Remove stale transformers.egg-info directory to avoid https://github.com/pypa/pip/issues/5466
stale_egg_info = Path(__file__).parent / "transformers.egg-info"
if stale_egg_info.exists():
    print(
        (
            "Warning: {} exists.\n\n"
            "If you recently updated transformers to 3.0 or later, this is expected,\n"
            "but it may prevent transformers from installing in editable mode.\n\n"
            "This directory is automatically generated by Python's packaging tools.\n"
            "I will remove it now.\n\n"
            "See https://github.com/pypa/pip/issues/5466 for details.\n"
        ).format(stale_egg_info)
    )
    shutil.rmtree(stale_egg_info)

# IMPORTANT:
# 1. all dependencies should be listed here with their version requirements if any
# 2. once modified, run: `make deps_table_update` to update src/transformers/dependency_versions_table.py
_deps = [
    "black>=20.8b1",
    "cookiecutter==1.7.2",
    "dataclasses",
    "datasets",
    "faiss-cpu",
    "fastapi",
    "filelock",
    "flake8>=3.8.3",
    "flax>=0.2.2",
    "fugashi>=1.0",
    "importlib_metadata",
    "ipadic>=1.0.0,<2.0",
    "isort>=5.5.4",
    "jax>=0.2.0",
    "jaxlib==0.1.55",
    "keras2onnx",
    "numpy",
    "onnxconverter-common",
    "onnxruntime-tools>=1.4.2",
    "onnxruntime>=1.4.0",
    "packaging",
    "parameterized",
    "protobuf",
    "psutil",
    "pydantic",
    "pytest",
    "pytest-xdist",
    "python>=3.6.0",
    "recommonmark",
    "regex!=2019.12.17",
    "requests",
    "sacremoses",
    "scikit-learn",
    "sentencepiece==0.1.91",
    "sphinx-copybutton",
    "sphinx-markdown-tables",
    "sphinx-rtd-theme==0.4.3",  # sphinx-rtd-theme==0.5.0 introduced big changes in the style.
    "sphinx==3.2.1",
    "starlette",
    "tensorflow-cpu>=2.3",
    "tensorflow>=2.3",
    "timeout-decorator",
    "tokenizers==0.9.4",
    "torch>=1.0",
    "tqdm>=4.27",
    "unidic>=1.0.2",
    "unidic_lite>=1.0.7",
    "uvicorn",
]

# tokenizers: "tokenizers==0.9.4" lookup table
# support non-versions file too so that they can be checked at run time
deps = {b: a for a, b in (re.findall(r"^(([^!=<>]+)(?:[!=<>].*)?$)", x)[0] for x in _deps)}

def deps_list(*pkgs):
    return [deps[pkg] for pkg in pkgs]

class DepsTableUpdateCommand(Command):
    """
    A custom distutils command that updates the dependency table.
    usage: python setup.py deps_table_update
    """

    description = "build runtime dependency table"
    user_options = [
        # format: (long option, short option, description).
        ("dep-table-update", None, "updates src/transformers/dependency_versions_table.py"),
    ]

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        entries = "\n".join([f'    "{k}": "{v}",' for k, v in deps.items()])
        content = [
            "# THIS FILE HAS BEEN AUTOGENERATED. To update:",
            "# 1. modify the `_deps` dict in setup.py",
            "# 2. run `make deps_table_update``",
            "deps = {",
            entries,
            "}",
            "",
        ]
        target = "src/transformers/dependency_versions_table.py"
        print(f"updating {target}")
        with open(target, "w", encoding="utf-8", newline="\n") as f:
            f.write("\n".join(content))

extras = {}

extras["ja"] = deps_list("fugashi", "ipadic", "unidic_lite", "unidic")
extras["sklearn"] = deps_list("scikit-learn")

extras["tf"] = deps_list("tensorflow", "onnxconverter-common", "keras2onnx")
extras["tf-cpu"] = deps_list("tensorflow-cpu", "onnxconverter-common", "keras2onnx")

extras["torch"] = deps_list("torch")

if os.name == "nt":  # windows
    extras["retrieval"] = deps_list("datasets")  # faiss is not supported on windows
    extras["flax"] = []  # jax is not supported on windows
else:
    extras["retrieval"] = deps_list("faiss-cpu", "datasets")
    extras["flax"] = deps_list("jax", "jaxlib", "flax")

extras["tokenizers"] = deps_list("tokenizers")
extras["onnxruntime"] = deps_list("onnxruntime", "onnxruntime-tools")
extras["modelcreation"] = deps_list("cookiecutter")

extras["serving"] = deps_list("pydantic", "uvicorn", "fastapi", "starlette")

extras["sentencepiece"] = deps_list("sentencepiece", "protobuf")
extras["retrieval"] = deps_list("faiss-cpu", "datasets")
extras["testing"] = (
    deps_list("pytest", "pytest-xdist", "timeout-decorator", "parameterized", "psutil")
    + extras["retrieval"]
    + extras["modelcreation"]
)
extras["docs"] = deps_list("recommonmark", "sphinx", "sphinx-markdown-tables", "sphinx-rtd-theme", "sphinx-copybutton")
extras["quality"] = deps_list("black", "isort", "flake8")

extras["all"] = extras["tf"] + extras["torch"] + extras["flax"] + extras["sentencepiece"] + extras["tokenizers"]

extras["dev"] = (
    extras["all"]
    + extras["testing"]
    + extras["quality"]
    + extras["ja"]
    + extras["docs"]
    + extras["sklearn"]
    + extras["modelcreation"]
)

extras["torchhub"] = deps_list("filelock", "importlib_metadata", "numpy", "packaging", "protobuf", "regex",
                               "requests", "sacremoses", "sentencepiece", "torch", "tokenizers", "tqdm")

# when modifying the following list, make sure to update src/transformers/dependency_versions_check.py
install_requires = [
    deps["dataclasses"] + ";python_version<'3.7'",  # dataclasses for Python versions that don't have it
    deps["importlib_metadata"] + ";python_version<'3.8'",  # importlib_metadata for Python versions that don't have it
    deps["filelock"],  # filesystem locks, e.g., to prevent parallel downloads
    deps["numpy"],
    deps["packaging"],  # utilities from PyPA to e.g., compare versions
    deps["regex"],  # for OpenAI GPT
    deps["requests"],  # for downloading models over HTTPS
    deps["sacremoses"],  # for XLM
    deps["tokenizers"],
    deps["tqdm"],  # progress bars in model download and training scripts
]

setup(
    name="transformers",
    version="4.3.0.dev0", # expected format is one of x.y.z.dev0, or x.y.z.rc1 or x.y.z (no to dashes, yes to dots)
    author="Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Sam Shleifer, Patrick von Platen, Sylvain Gugger, Google AI Language Team Authors, Open AI team Authors, Facebook AI Authors, Carnegie Mellon University Authors",
    author_email="thomas@huggingface.co",
    description="State-of-the-art Natural Language Processing for TensorFlow 2.0 and PyTorch",
    long_description=open("README.md", "r", encoding="utf-8").read(),
    long_description_content_type="text/markdown",
    keywords="NLP deep learning transformer pytorch tensorflow BERT GPT GPT-2 google openai CMU",
    license="Apache",
    url="https://github.com/huggingface/transformers",
    package_dir={"": "src"},
    packages=find_packages("src"),
    extras_require=extras,
    entry_points={"console_scripts": ["transformers-cli=transformers.commands.transformers_cli:main"]},
    python_requires=">=3.6.0",
    install_requires=install_requires,
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Intended Audience :: Developers",
        "Intended Audience :: Education",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: Apache Software License",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Topic :: Scientific/Engineering :: Artificial Intelligence",
    ],
    cmdclass={"deps_table_update": DepsTableUpdateCommand},
)
<commit_msg>[setup.py] note on how to get to transformers exact dependencies from shell (#9553)<commit_after># Copyright 2020 The HuggingFace Team. All rights reserved.
#
# 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.

"""
Simple check list from AllenNLP repo: https://github.com/allenai/allennlp/blob/master/setup.py

To create the package for pypi.

1. Change the version in __init__.py, setup.py as well as docs/source/conf.py. Remove the master from the links in
   the new models of the README:
   (https://huggingface.co/transformers/master/model_doc/ -> https://huggingface.co/transformers/model_doc/)
   then run `make fix-copies` to fix the index of the documentation.

2. Unpin specific versions from setup.py that use a git install.

2. Commit these changes with the message: "Release: VERSION"

3. Add a tag in git to mark the release: "git tag VERSION -m 'Adds tag VERSION for pypi' "
   Push the tag to git: git push --tags origin master

4. Build both the sources and the wheel. Do not change anything in setup.py between
   creating the wheel and the source distribution (obviously).

   For the wheel, run: "python setup.py bdist_wheel" in the top level directory.
   (this will build a wheel for the python version you use to build it).

   For the sources, run: "python setup.py sdist"
   You should now have a /dist directory with both .whl and .tar.gz source versions.

5. Check that everything looks correct by uploading the package to the pypi test server:

   twine upload dist/* -r pypitest
   (pypi suggest using twine as other methods upload files via plaintext.)
   You may have to specify the repository url, use the following command then:
   twine upload dist/* -r pypitest --repository-url=https://test.pypi.org/legacy/

   Check that you can install it in a virtualenv by running:
   pip install -i https://testpypi.python.org/pypi transformers

6. Upload the final version to actual pypi:
   twine upload dist/* -r pypi

7. Copy the release notes from RELEASE.md to the tag in github once everything is looking hunky-dory.

8. Add the release version to docs/source/_static/js/custom.js and .circleci/deploy.sh

9. Update README.md to redirect to correct documentation.

10. Update the version in __init__.py, setup.py to the new version "-dev" and push to master.
"""

import os
import re
import shutil
from distutils.core import Command
from pathlib import Path

from setuptools import find_packages, setup

# Remove stale transformers.egg-info directory to avoid https://github.com/pypa/pip/issues/5466
stale_egg_info = Path(__file__).parent / "transformers.egg-info"
if stale_egg_info.exists():
    print(
        (
            "Warning: {} exists.\n\n"
            "If you recently updated transformers to 3.0 or later, this is expected,\n"
            "but it may prevent transformers from installing in editable mode.\n\n"
            "This directory is automatically generated by Python's packaging tools.\n"
            "I will remove it now.\n\n"
            "See https://github.com/pypa/pip/issues/5466 for details.\n"
        ).format(stale_egg_info)
    )
    shutil.rmtree(stale_egg_info)

# IMPORTANT:
# 1. all dependencies should be listed here with their version requirements if any
# 2. once modified, run: `make deps_table_update` to update src/transformers/dependency_versions_table.py
_deps = [
    "black>=20.8b1",
    "cookiecutter==1.7.2",
    "dataclasses",
    "datasets",
    "faiss-cpu",
    "fastapi",
    "filelock",
    "flake8>=3.8.3",
    "flax>=0.2.2",
    "fugashi>=1.0",
    "importlib_metadata",
    "ipadic>=1.0.0,<2.0",
    "isort>=5.5.4",
    "jax>=0.2.0",
    "jaxlib==0.1.55",
    "keras2onnx",
    "numpy",
    "onnxconverter-common",
    "onnxruntime-tools>=1.4.2",
    "onnxruntime>=1.4.0",
    "packaging",
    "parameterized",
    "protobuf",
    "psutil",
    "pydantic",
    "pytest",
    "pytest-xdist",
    "python>=3.6.0",
    "recommonmark",
    "regex!=2019.12.17",
    "requests",
    "sacremoses",
    "scikit-learn",
    "sentencepiece==0.1.91",
    "sphinx-copybutton",
    "sphinx-markdown-tables",
    "sphinx-rtd-theme==0.4.3",  # sphinx-rtd-theme==0.5.0 introduced big changes in the style.
    "sphinx==3.2.1",
    "starlette",
    "tensorflow-cpu>=2.3",
    "tensorflow>=2.3",
    "timeout-decorator",
    "tokenizers==0.9.4",
    "torch>=1.0",
    "tqdm>=4.27",
    "unidic>=1.0.2",
    "unidic_lite>=1.0.7",
    "uvicorn",
]

# this is a lookup table with items like:
#
# tokenizers: "tokenizers==0.9.4"
# packaging: "packaging"
#
# some of the values are versioned whereas others aren't.
deps = {b: a for a, b in (re.findall(r"^(([^!=<>]+)(?:[!=<>].*)?$)", x)[0] for x in _deps)}

# since we save this data in src/transformers/dependency_versions_table.py it can be easily accessed from
# anywhere. If you need to quickly access the data from this table in a shell, you can do so easily with:
#
# python -c 'import sys; from transformers.dependency_versions_table import deps; \
# print(" ".join([ deps[x] for x in sys.argv[1:]]))' tokenizers datasets
#
# Just pass the desired package names to that script as it's shown with 2 packages above.
#
# If transformers is not yet installed and the work is done from the cloned repo remember to add `PYTHONPATH=src` to the script above
#
# You can then feed this for example to `pip`:
#
# pip install -U $(python -c 'import sys; from transformers.dependency_versions_table import deps; \
# print(" ".join([ deps[x] for x in sys.argv[1:]]))' tokenizers datasets)
#

def deps_list(*pkgs):
    return [deps[pkg] for pkg in pkgs]

class DepsTableUpdateCommand(Command):
    """
    A custom distutils command that updates the dependency table.
    usage: python setup.py deps_table_update
    """

    description = "build runtime dependency table"
    user_options = [
        # format: (long option, short option, description).
        ("dep-table-update", None, "updates src/transformers/dependency_versions_table.py"),
    ]

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        entries = "\n".join([f'    "{k}": "{v}",' for k, v in deps.items()])
        content = [
            "# THIS FILE HAS BEEN AUTOGENERATED. To update:",
            "# 1. modify the `_deps` dict in setup.py",
            "# 2. run `make deps_table_update``",
            "deps = {",
            entries,
            "}",
            "",
        ]
        target = "src/transformers/dependency_versions_table.py"
        print(f"updating {target}")
        with open(target, "w", encoding="utf-8", newline="\n") as f:
            f.write("\n".join(content))

extras = {}

extras["ja"] = deps_list("fugashi", "ipadic", "unidic_lite", "unidic")
extras["sklearn"] = deps_list("scikit-learn")

extras["tf"] = deps_list("tensorflow", "onnxconverter-common", "keras2onnx")
extras["tf-cpu"] = deps_list("tensorflow-cpu", "onnxconverter-common", "keras2onnx")

extras["torch"] = deps_list("torch")

if os.name == "nt":  # windows
    extras["retrieval"] = deps_list("datasets")  # faiss is not supported on windows
    extras["flax"] = []  # jax is not supported on windows
else:
    extras["retrieval"] = deps_list("faiss-cpu", "datasets")
    extras["flax"] = deps_list("jax", "jaxlib", "flax")

extras["tokenizers"] = deps_list("tokenizers")
extras["onnxruntime"] = deps_list("onnxruntime", "onnxruntime-tools")
extras["modelcreation"] = deps_list("cookiecutter")

extras["serving"] = deps_list("pydantic", "uvicorn", "fastapi", "starlette")

extras["sentencepiece"] = deps_list("sentencepiece", "protobuf")
extras["retrieval"] = deps_list("faiss-cpu", "datasets")
extras["testing"] = (
    deps_list("pytest", "pytest-xdist", "timeout-decorator", "parameterized", "psutil")
    + extras["retrieval"]
    + extras["modelcreation"]
)
extras["docs"] = deps_list("recommonmark", "sphinx", "sphinx-markdown-tables", "sphinx-rtd-theme", "sphinx-copybutton")
extras["quality"] = deps_list("black", "isort", "flake8")

extras["all"] = extras["tf"] + extras["torch"] + extras["flax"] + extras["sentencepiece"] + extras["tokenizers"]

extras["dev"] = (
    extras["all"]
    + extras["testing"]
    + extras["quality"]
    + extras["ja"]
    + extras["docs"]
    + extras["sklearn"]
    + extras["modelcreation"]
)

extras["torchhub"] = deps_list("filelock", "importlib_metadata", "numpy", "packaging", "protobuf", "regex",
                               "requests", "sacremoses", "sentencepiece", "torch", "tokenizers", "tqdm")

# when modifying the following list, make sure to update src/transformers/dependency_versions_check.py
install_requires = [
    deps["dataclasses"] + ";python_version<'3.7'",  # dataclasses for Python versions that don't have it
    deps["importlib_metadata"] + ";python_version<'3.8'",  # importlib_metadata for Python versions that don't have it
    deps["filelock"],  # filesystem locks, e.g., to prevent parallel downloads
    deps["numpy"],
    deps["packaging"],  # utilities from PyPA to e.g., compare versions
    deps["regex"],  # for OpenAI GPT
    deps["requests"],  # for downloading models over HTTPS
    deps["sacremoses"],  # for XLM
    deps["tokenizers"],
    deps["tqdm"],  # progress bars in model download and training scripts
]

setup(
    name="transformers",
    version="4.3.0.dev0", # expected format is one of x.y.z.dev0, or x.y.z.rc1 or x.y.z (no to dashes, yes to dots)
    author="Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Sam Shleifer, Patrick von Platen, Sylvain Gugger, Google AI Language Team Authors, Open AI team Authors, Facebook AI Authors, Carnegie Mellon University Authors",
    author_email="thomas@huggingface.co",
    description="State-of-the-art Natural Language Processing for TensorFlow 2.0 and PyTorch",
    long_description=open("README.md", "r", encoding="utf-8").read(),
    long_description_content_type="text/markdown",
    keywords="NLP deep learning transformer pytorch tensorflow BERT GPT GPT-2 google openai CMU",
    license="Apache",
    url="https://github.com/huggingface/transformers",
    package_dir={"": "src"},
    packages=find_packages("src"),
    extras_require=extras,
    entry_points={"console_scripts": ["transformers-cli=transformers.commands.transformers_cli:main"]},
    python_requires=">=3.6.0",
    install_requires=install_requires,
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Intended Audience :: Developers",
        "Intended Audience :: Education",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: Apache Software License",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Topic :: Scientific/Engineering :: Artificial Intelligence",
    ],
    cmdclass={"deps_table_update": DepsTableUpdateCommand},
)
<|endoftext|>


<commit_before>#!/usr/bin/env python

from setuptools import find_packages, setup

setup(
    name='cmsplugin_gallery',
    version='0.5.3',
    author='Piotr Kilczuk',
    author_email='p.kilczuk@neumea.pl',
    url='http://github.com/centralniak',
    description = 'DjangoCMS image gallery plugin with drag&drop '
                  'reordering in admin, support for thumbnails and '
                  'jQueryTOOLS overlay.',
    packages=find_packages(),
    provides=['cmsplugin_gallery', ],
    include_package_data=True,
    install_requires = ['django-inline-ordering>=0.1.1', 'easy-thumbnails',]
)<commit_msg>Bump version to 0.5.4<commit_after>#!/usr/bin/env python

from setuptools import find_packages, setup

setup(
    name='cmsplugin_gallery',
    version='0.5.4',
    author='Piotr Kilczuk',
    author_email='piotr@tymaszweb.pl',
    url='http://github.com/centralniak',
    description = 'DjangoCMS image gallery plugin with drag&drop '
                  'reordering in admin, support for thumbnails and '
                  'jQueryTOOLS overlay.',
    packages=find_packages(),
    provides=['cmsplugin_gallery', ],
    include_package_data=True,
    install_requires = ['django-inline-ordering>=0.1.1', 'easy-thumbnails',]
)<|endoftext|>


<commit_before>#!/usr/bin/env python

from setuptools import setup, find_packages

import os
execfile(os.path.join('swiftype', 'version.py'))

setup(
    name = 'swiftype',
    version = VERSION,
    description = 'Swiftype API Client for Python',
    packages = find_packages(),
    install_requires = ["anyjson"],
    classifiers = [
        'Intended Audience :: Developers',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
)
<commit_msg>update setup.py to include author and url<commit_after>#!/usr/bin/env python

from setuptools import setup, find_packages

import os
execfile(os.path.join('swiftype', 'version.py'))

setup(
    name = 'swiftype',
    version = VERSION,
    description = 'Swiftype API Client for Python',
    author = 'Swiftype',
    author_email = 'team@swiftype.com',
    url = 'https://swiftype.com/',
    packages = find_packages(),
    install_requires = ["anyjson"],
    classifiers = [
        'Intended Audience :: Developers',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
)
<|endoftext|>


<commit_before>from distutils.core import setup

import apitestcase

setup(
    name="apitestcase",
    description="An integration test suite for HTTP APIs",
    version=".".join(apitestcase.__version__),
    author="Trevor Bramwell",
    author_email="trevor@bramwell.net",
    packages=['apitestcase'],
    license="MIT",
    install_requires=['requests'],
    long_description=open("README.rst").read(),
)
<commit_msg>Use setuptools, not distutils; add test_suite<commit_after>from setuptools import setup

import apitestcase

setup(
    name="apitestcase",
    description="An integration test suite for HTTP APIs",
    version=".".join(apitestcase.__version__),
    author="Trevor Bramwell",
    author_email="trevor@bramwell.net",
    packages=['apitestcase'],
    license="MIT",
    install_requires=['requests'],
    long_description=open("README.rst").read(),
    test_suite="test",
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
from setuptools import setup
import brain

setup(
	name='brain',
	version=brain.__version__,
	author=brain.__author__,
	author_email=brain.__email__,
	url='http://github.com/jrialland/python-brain',
	download_url = 'https://github.com/jrialland/python-brain/tarball/'+str(brain.__version__),
        packages=['brain'],
	description='lightweight neural network library for Python',
	provides=['brain'],
	long_description='lightweight neural network library for Python',
	zip_safe=True,
	license=brain.__license__,
	include_package_data=True,
	keywords=['ia','neural network'],
	classifiers=[
		'Intended Audience :: Developers',
		'Operating System :: OS Independent',
		'Topic :: Software Development',
		'Programming Language :: Python',
	]
)
<commit_msg>renamed to 'pythonbrain'<commit_after>#!/usr/bin/env python
from setuptools import setup
import brain

setup(
	name='pythonbrain',
	version=brain.__version__,
	author=brain.__author__,
	author_email=brain.__email__,
	url='http://github.com/jrialland/python-brain',
	download_url = 'https://github.com/jrialland/python-brain/tarball/'+str(brain.__version__),
        packages=['brain'],
	description='lightweight neural network library for Python',
	provides=['brain'],
	long_description='lightweight neural network library for Python',
	zip_safe=True,
	license=brain.__license__,
	include_package_data=True,
	keywords=['ia','neural network'],
	classifiers=[
		'Intended Audience :: Developers',
		'Operating System :: OS Independent',
		'Topic :: Software Development',
		'Programming Language :: Python',
	]
)
<|endoftext|>