Exemplo n.º 1
0
    def _validate_version(version):
        if isinstance(version, numbers.Number):
            # Some people apparently take "version number" too literally :)
            version = str(version)

        if version is not None:
            try:
                packaging.version.Version(version)
            except (packaging.version.InvalidVersion, TypeError):
                warnings.warn(
                    "The version specified (%r) is an invalid version, this "
                    "may not work as expected with newer versions of "
                    "setuptools, pip, and PyPI. Please see PEP 440 for more "
                    "details." % version)
                return setuptools.sic(version)
        return version
Exemplo n.º 2
0
# Only include packages under the 'google' namespace. Do not include tests,
# benchmarks, etc.
packages = [
    package for package in setuptools.PEP420PackageFinder.find()
    if package.startswith("google")
]

# Determine which namespaces are needed.
namespaces = ["google"]
if "google.cloud" in packages:
    namespaces.append("google.cloud")

setuptools.setup(
    name=name,
    version=setuptools.sic(version),
    description=description,
    long_description=readme,
    author="Google LLC",
    author_email="*****@*****.**",
    license="Apache 2.0",
    url="https://github.com/googleapis/python-bigquery",
    classifiers=[
        release_status,
        "Intended Audience :: Developers",
        "License :: OSI Approved :: Apache Software License",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
Exemplo n.º 3
0
# benchmarks, etc.
packages = [
    package
    for package in setuptools.PEP420PackageFinder.find()
    if package.startswith("google")
]

# Determine which namespaces are needed.
namespaces = ["google"]
if "google.cloud" in packages:
    namespaces.append("google.cloud")


setuptools.setup(
    name=name,
    version=sic(version),
    description=description,
    long_description=readme,
    author="Google LLC",
    author_email="*****@*****.**",
    license="Apache 2.0",
    url="https://github.com/googleapis/python-pubsub",
    classifiers=[
        release_status,
        "Intended Audience :: Developers",
        "License :: OSI Approved :: Apache Software License",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
Exemplo n.º 4
0
def __read_test_cases():
    base = dict(
        name="package",
        version="0.0.1",
        author="Foo Bar",
        author_email="*****@*****.**",
        long_description="Long\ndescription",
        description="Short description",
        keywords=["one", "two"],
    )

    params = functools.partial(dict, base)

    test_cases = [
        ('Metadata version 1.0', params()),
        ('Metadata Version 1.0: Short long description',
         params(long_description='Short long description', )),
        ('Metadata version 1.1: Classifiers',
         params(classifiers=[
             'Programming Language :: Python :: 3',
             'Programming Language :: Python :: 3.7',
             'License :: OSI Approved :: MIT License',
         ], )),
        ('Metadata version 1.1: Download URL',
         params(download_url='https://example.com', )),
        ('Metadata Version 1.2: Requires-Python',
         params(python_requires='>=3.7', )),
        pytest.param(
            'Metadata Version 1.2: Project-Url',
            params(project_urls=dict(Foo='https://example.bar')),
            marks=pytest.mark.xfail(
                reason="Issue #1578: project_urls not read", ),
        ),
        ('Metadata Version 2.1: Long Description Content Type',
         params(long_description_content_type='text/x-rst; charset=UTF-8', )),
        ('License', params(license='MIT', )),
        ('License multiline',
         params(license='This is a long license \nover multiple lines', )),
        pytest.param(
            'Metadata Version 2.1: Provides Extra',
            params(provides_extras=['foo', 'bar']),
            marks=pytest.mark.xfail(reason="provides_extras not read"),
        ),
        ('Missing author',
         dict(
             name='foo',
             version='1.0.0',
             author_email='*****@*****.**',
         )),
        ('Missing author e-mail',
         dict(
             name='foo',
             version='1.0.0',
             author='Snorri Sturluson',
         )),
        ('Missing author and e-mail', dict(
            name='foo',
            version='1.0.0',
        )),
        ('Bypass normalized version', dict(
            name='foo',
            version=sic('1.0.0a'),
        )),
    ]

    return test_cases
Exemplo n.º 5
0
from setuptools import sic
import yaml

readme_file = os.path.join(os.path.dirname(os.path.realpath(__file__)),
                           "README.md")
with open(readme_file, "r") as readme_fh:
    readme = readme_fh.read()

info_file = os.path.join(os.path.dirname(os.path.realpath(__file__)),
                         "conf/info.yaml")
with open(info_file, "r") as info_fh:
    info = yaml.load(info_fh, Loader=yaml.FullLoader)

setuptools.setup(
    name="pythonaem",
    version=sic(info["version"]),
    author="Shine Solutions",
    author_email="*****@*****.**",
    keywords=["Adobe Experience Manager (AEM) API"],
    description="Python client for AEM API",
    long_description=readme,
    long_description_content_type="text/markdown",
    url="https://github.com/shinesolutions/pythonaem",
    packages=setuptools.find_packages(),
    include_package_data=True,
    zip_safe=True,
    classifiers=[
        "Programming Language :: Python :: 3",
        "License :: OSI Approved :: Apache Software License",
        "Operating System :: OS Independent",
    ],
Exemplo n.º 6
0
#!/usr/bin/env python

# Copyright (c) 2020 vesoft inc. All rights reserved.
#
# This source code is licensed under Apache 2.0 License,
# attached with Common Clause Condition 1.0, found in the LICENSES directory.

from setuptools import setup, find_packages, sic

setup(
    name='nebula2-python',
    version=sic('2.0.0-1'),
    license="Apache 2.0 + Common Clause 1.0",
    author='vesoft-inc',
    author_email='*****@*****.**',
    long_description='Python client for Nebula Graph V2.0',
    url='https://github.com/vesoft-inc/nebula-python',
    install_requires=[
        'httplib2', 'future', 'six', 'futures; python_version == "2.7"'
    ],
    packages=find_packages(),
    platforms=["2.7, 3.5, 3.7"],
    package_dir={
        'nebula2': 'nebula2',
        'thirft': 'thirft'
    },
)
Exemplo n.º 7
0
#!/usr/bin/env python
import os
import re

import setuptools

PACKAGE_NAME = "nba_crawler"
DESCRIPTION = "Utilities for crawling NBA Stats data"


def get_version(package_name):
    with open(os.path.join(package_name, "version.py")) as f:
        match = re.match('__version__ = "(.+)"', f.readline())
        return match.groups()[0]


setuptools.setup(
    name=PACKAGE_NAME,
    version=setuptools.sic(get_version(PACKAGE_NAME)),
    package_data={PACKAGE_NAME: ["py.typed"]},
    packages=setuptools.find_packages(
        exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
    description=DESCRIPTION,
    entry_points={
        "console_scripts": ["nba_crawler = nba_crawler.__main__:_nba_crawler"]
    },
    zip_safe=False,
)
try:
    from pip.req import parse_requirements
except ImportError:  # pip >= 10.0.0
    from pip._internal.req import parse_requirements

parsed_reqs = parse_requirements('requirements.txt', session='hack')
installed_reqs = [str(ir.requirement) for ir in parsed_reqs]

with open("README.md", "r") as fh:
    long_description = fh.read()

name = "5Minds IT-Solutions GmbH & Co. KG"

setuptools.setup(
    name="robotframework-processcube",
    version=setuptools.sic('1.0.0'),
    description="Robot Framework Keywords for processcube workflow engine.",
    long_description=long_description,
    long_description_content_type="text/markdown",
    author=name,
    author_email="*****@*****.**",
    url="https://github.com/atlas-engine-contrib/robotframework-processcube",
    packages=setuptools.find_packages(),
    install_requires=installed_reqs,
    classifiers=[
        "Intended Audience :: Developers",
        "Natural Language :: English",
        "Programming Language :: Python :: 3",
        "Topic :: Software Development",
        "License :: OSI Approved :: Apache Software License",
        "Operating System :: OS Independent",