Skip to content

Commit f007904

Browse files
authored
Make scripts and entry_points mutually exclusive based on setuptools presence (#650)
When installing newrelic-admin with setuptools, the newrelic-admin shim is written to bin multiple times due to the inclusion of both `scripts` and `entry-points` as arguments to `setup`. This poses problems for installers that comply with newer PEP standards, such as the Pypa `installer` package: https://github.com/pypa/installer
1 parent 7692dee commit f007904

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,15 @@ def build_extension(self, ext):
154154
package_data={
155155
"newrelic": ["newrelic.ini", "version.txt", "packages/urllib3/LICENSE.txt", "common/cacert.pem"],
156156
},
157-
scripts=["scripts/newrelic-admin"],
158157
extras_require={"infinite-tracing": ["grpcio", "protobuf"]},
159158
)
160159

161160
if with_setuptools:
162161
kwargs["entry_points"] = {
163162
"console_scripts": ["newrelic-admin = newrelic.admin:main"],
164163
}
164+
else:
165+
kwargs["scripts"] = ["scripts/newrelic-admin"]
165166

166167

167168
def with_librt():

0 commit comments

Comments
 (0)