From 28ff054b125dd7e13704e104a9a6a27e3bf8fe46 Mon Sep 17 00:00:00 2001 From: Ray Luo Date: Wed, 10 Jul 2019 12:17:37 -0700 Subject: [PATCH 1/2] Adjusting how we pack LICENSE Previously the LICENSE file would end up in `/usr/local` which would require root permission --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 06256333..ee32b88f 100644 --- a/setup.py +++ b/setup.py @@ -67,7 +67,7 @@ 'Operating System :: OS Independent', ], packages=find_packages(exclude=["tests"]), - data_files=[('', ['LICENSE'])], + package_data={'': ['LICENSE']}, # Do not use data_files=[...]. See https://stackoverflow.com/questions/14211575 install_requires=[ 'requests>=2.0.0,<3', 'PyJWT[crypto]>=1.0.0,<2', From c28bf50cac08f3ac3bae127e3a15154def03318d Mon Sep 17 00:00:00 2001 From: Ray Luo Date: Wed, 10 Jul 2019 13:47:42 -0700 Subject: [PATCH 2/2] More explanation --- setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ee32b88f..0c26e5da 100644 --- a/setup.py +++ b/setup.py @@ -67,7 +67,10 @@ 'Operating System :: OS Independent', ], packages=find_packages(exclude=["tests"]), - package_data={'': ['LICENSE']}, # Do not use data_files=[...]. See https://stackoverflow.com/questions/14211575 + package_data={'': ['LICENSE']}, # Do not use data_files=[...], + # which would cause the LICENSE being copied to /usr/local, + # and tend to fail because of insufficient permission. + # See https://stackoverflow.com/a/14211600/728675 for more detail install_requires=[ 'requests>=2.0.0,<3', 'PyJWT[crypto]>=1.0.0,<2',