diff --git a/eng/tox/tox.ini b/eng/tox/tox.ini index eb020fb08aa9..3e964ea47f0f 100644 --- a/eng/tox/tox.ini +++ b/eng/tox/tox.ini @@ -55,10 +55,20 @@ deps = commands = - mypy {toxinidir}/azure - [testenv:sdist] skipsdist = false skip_install = false +changedir = {toxinidir} +deps = + {[base]deps} +commands = + pytest \ + {posargs} \ + {toxinidir} + +[testenv:develop] +skipsdist = false +skip_install = false usedevelop = true changedir = {toxinidir} deps = diff --git a/scripts/dev_setup.py b/scripts/dev_setup.py index 759d74bdb7da..77b11d4f2e68 100644 --- a/scripts/dev_setup.py +++ b/scripts/dev_setup.py @@ -42,6 +42,15 @@ def pip_command(command, additional_dir=".", error_ok=False): default="", help="Comma separated list of targeted packages. Used to limit the number of packages that dependencies will be installed for.", ) +parser.add_argument( + "--disabledevelop", + dest="develop_mode_disabled", + default=False, + action="store_true", + help="Add this argument if you would prefer to install the package with a simple `pip install` versus `pip install -e`", +) + + args = parser.parse_args() packages = { @@ -122,8 +131,12 @@ def pip_command(command, additional_dir=".", error_ok=False): "install -r dev_requirements.txt", os.path.join(packages[package_name], package_name), ) + + mode_arg = "" if args.develop_mode_disabled else "-e" + pip_command( - "install --ignore-requires-python -e {}".format( + "install --ignore-requires-python {} {}".format( + mode_arg, os.path.join(packages[package_name], package_name) ) ) diff --git a/scripts/devops_tasks/setup_execute_tests.py b/scripts/devops_tasks/setup_execute_tests.py index d3eb6a7bdb07..53139504eeb0 100644 --- a/scripts/devops_tasks/setup_execute_tests.py +++ b/scripts/devops_tasks/setup_execute_tests.py @@ -65,8 +65,9 @@ def prep_tests(targeted_packages, python_version): [ python_version, dev_setup_script_location, + "--disabledevelop", "-p", - ",".join([os.path.basename(p) for p in targeted_packages]), + ",".join([os.path.basename(p) for p in targeted_packages]) ], root_dir, ) diff --git a/sdk/appconfiguration/azure-appconfiguration/MANIFEST.in b/sdk/appconfiguration/azure-appconfiguration/MANIFEST.in index fb0660bea2d2..9fd2bc9d0339 100644 --- a/sdk/appconfiguration/azure-appconfiguration/MANIFEST.in +++ b/sdk/appconfiguration/azure-appconfiguration/MANIFEST.in @@ -1,5 +1,5 @@ recursive-include tests *.py *.yaml -include *.rst +include *.md include azure/__init__.py include azure/data/__init__.py diff --git a/sdk/applicationinsights/azure-applicationinsights/MANIFEST.in b/sdk/applicationinsights/azure-applicationinsights/MANIFEST.in index bb37a2723dae..88830671bc4d 100644 --- a/sdk/applicationinsights/azure-applicationinsights/MANIFEST.in +++ b/sdk/applicationinsights/azure-applicationinsights/MANIFEST.in @@ -1 +1,3 @@ include *.rst + +include azure/__init__.py \ No newline at end of file diff --git a/sdk/datalake/azure-mgmt-datalake-analytics/MANIFEST.in b/sdk/datalake/azure-mgmt-datalake-analytics/MANIFEST.in index bb37a2723dae..1c9ebaab0de4 100644 --- a/sdk/datalake/azure-mgmt-datalake-analytics/MANIFEST.in +++ b/sdk/datalake/azure-mgmt-datalake-analytics/MANIFEST.in @@ -1 +1,4 @@ include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py +include azure/mgmt/datalake/__init__.py diff --git a/sdk/datalake/azure-mgmt-datalake-store/MANIFEST.in b/sdk/datalake/azure-mgmt-datalake-store/MANIFEST.in index bb37a2723dae..1c9ebaab0de4 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/MANIFEST.in +++ b/sdk/datalake/azure-mgmt-datalake-store/MANIFEST.in @@ -1 +1,4 @@ include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py +include azure/mgmt/datalake/__init__.py diff --git a/sdk/eventhub/azure-eventhubs/MANIFEST.in b/sdk/eventhub/azure-eventhubs/MANIFEST.in index c9c2d50a3ec3..50c61fef797b 100644 --- a/sdk/eventhub/azure-eventhubs/MANIFEST.in +++ b/sdk/eventhub/azure-eventhubs/MANIFEST.in @@ -1,2 +1,2 @@ -include *.rst +include *.md include azure/__init__.py \ No newline at end of file diff --git a/sdk/identity/azure-identity/MANIFEST.in b/sdk/identity/azure-identity/MANIFEST.in new file mode 100644 index 000000000000..50c61fef797b --- /dev/null +++ b/sdk/identity/azure-identity/MANIFEST.in @@ -0,0 +1,2 @@ +include *.md +include azure/__init__.py \ No newline at end of file diff --git a/sdk/redis/azure-mgmt-redis/dev_requirements.txt b/sdk/redis/azure-mgmt-redis/dev_requirements.txt index 6ccb7f031ddd..f6457a93d5e8 100644 --- a/sdk/redis/azure-mgmt-redis/dev_requirements.txt +++ b/sdk/redis/azure-mgmt-redis/dev_requirements.txt @@ -1 +1 @@ --e ../../../tools/azure-sdk-tools +-e ../../../tools/azure-sdk-tools \ No newline at end of file diff --git a/sdk/scheduler/azure-mgmt-scheduler/MANIFEST.in b/sdk/scheduler/azure-mgmt-scheduler/MANIFEST.in index bb37a2723dae..ac87972df424 100644 --- a/sdk/scheduler/azure-mgmt-scheduler/MANIFEST.in +++ b/sdk/scheduler/azure-mgmt-scheduler/MANIFEST.in @@ -1 +1,3 @@ include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py diff --git a/sdk/servermanager/azure-mgmt-servermanager/MANIFEST.in b/sdk/servermanager/azure-mgmt-servermanager/MANIFEST.in index bb37a2723dae..ac87972df424 100644 --- a/sdk/servermanager/azure-mgmt-servermanager/MANIFEST.in +++ b/sdk/servermanager/azure-mgmt-servermanager/MANIFEST.in @@ -1 +1,3 @@ include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py diff --git a/sdk/storage/azure-storage-queue/dev_requirements.txt b/sdk/storage/azure-storage-queue/dev_requirements.txt index c0c5aade709c..8657b2ccb464 100644 --- a/sdk/storage/azure-storage-queue/dev_requirements.txt +++ b/sdk/storage/azure-storage-queue/dev_requirements.txt @@ -2,4 +2,4 @@ -e ../../../tools/azure-sdk-tools -e ../../identity/azure-identity aiohttp>=3.0; python_version >= '3.5' -pytest \ No newline at end of file +pytest