Skip to content

Commit

Permalink
Make scripts and entry_points mutually exclusive based on setuptools …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
admp-fh committed Oct 6, 2022
1 parent 7692dee commit f007904
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,15 @@ def build_extension(self, ext):
package_data={
"newrelic": ["newrelic.ini", "version.txt", "packages/urllib3/LICENSE.txt", "common/cacert.pem"],
},
scripts=["scripts/newrelic-admin"],
extras_require={"infinite-tracing": ["grpcio", "protobuf"]},
)

if with_setuptools:
kwargs["entry_points"] = {
"console_scripts": ["newrelic-admin = newrelic.admin:main"],
}
else:
kwargs["scripts"] = ["scripts/newrelic-admin"]


def with_librt():
Expand Down

0 comments on commit f007904

Please sign in to comment.