Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update packaging
  • Loading branch information
xiangyan99 committed Aug 2, 2019
commit 4a75f3ba086a6c2afac7ab6ca7ce7f3dd53b6de4
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from .azure_appconfiguration_client import AzureAppConfigurationClient
from ._generated.models import ConfigurationSetting

__version__ = "1.0.0b2"
__all__ = [
'AzureAppConfigurationClient',
'ConfigurationSetting',
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[packaging]
package_name = "azure-data-appconfiguration"
package_nspkg = "azure-data-nspkg"
package_pprint_name = "MyService Management"
package_pprint_name = "App Configuration Data"
package_doc_id = ""
is_stable = false
is_arm = true
need_msrestazure = true
is_arm = false
need_msrestazure = false
auto_update = false
52 changes: 32 additions & 20 deletions sdk/appconfiguration/azure-data-appconfiguration/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
# license information.
#--------------------------------------------------------------------------

import sys
import re
import os.path
from io import open
from setuptools import find_packages, setup

# Change the PACKAGE_NAME only to change folder and different name
PACKAGE_NAME = "azure-data-appconfiguration"
PACKAGE_PPRINT_NAME = "MyService Management"
PACKAGE_PPRINT_NAME = "App Configuration Data"

# a-b-c => a/b/c
package_folder_path = PACKAGE_NAME.replace('-', '/')
Expand All @@ -36,30 +37,42 @@
pass

# Version extraction inspired from 'requests'
with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd:
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]',
with open(os.path.join(package_folder_path, '__init__.py'), 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)

if not version:
raise RuntimeError('Cannot find version information')

with open('README.rst', encoding='utf-8') as f:
with open('README.md', encoding='utf-8') as f:
readme = f.read()
with open('HISTORY.rst', encoding='utf-8') as f:
with open('HISTORY.md', encoding='utf-8') as f:
history = f.read()

exclude_packages = [
'tests',
'examples',
# Exclude packages that will be covered by PEP420 or nspkg
'azure',
]
if sys.version_info < (3, 5, 3):
exclude_packages.extend([
'*.aio',
'*.aio.*'
])

setup(
name=PACKAGE_NAME,
version=version,
description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME),
description='Microsoft {} Library for Python'.format(PACKAGE_PPRINT_NAME),
long_description=readme + '\n\n' + history,
long_description_content_type='text/x-rst',
long_description_content_type='text/markdown',
license='MIT License',
author='Microsoft Corporation',
author_email='[email protected]',
url='https://github.com/Azure/azure-sdk-for-python',
url='https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/appconfiguration/azure-data-appconfiguration',
classifiers=[
'Development Status :: 4 - Beta',
'Development Status :: 3 - Alpha',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
Expand All @@ -70,18 +83,17 @@
'License :: OSI Approved :: MIT License',
],
zip_safe=False,
packages=find_packages(exclude=[
'tests',
# Exclude packages that will be covered by PEP420 or nspkg
'azure',
'azure.data',
]),
packages=find_packages(exclude=exclude_packages),
install_requires=[
'msrest>=0.5.0',
'msrestazure>=0.4.32,<2.0.0',
'azure-common~=1.1',
"azure-core>=1.0.0b2",
],
extras_require={
":python_version<'3.0'": ['azure-data-nspkg'],
":python_version<'3.0'": ['azure-nspkg'],
":python_version<'3.4'": ['enum34>=1.0.4'],
":python_version<'3.5'": ['typing'],
"async:python_version>='3.5'": [
'aiohttp>=3.0',
'aiodns>=2.0'
],
}
)
)