Repository: conda-incubator/grayskull (python)

Issue:
[BUG] Package cannot be noarch if scripts argument is used
**Describe the bug**
A clear and concise description of what the bug is.

If a package has the `scripts` argument in _setup.py_ it cannot be [`noarch`](https://conda-forge.org/docs/maintainer/knowledge_base.html#noarch-python). Currently, this is not taken into account by Grayskull.

**To Reproduce**
Steps to reproduce the behavior:
1. Create package

**Expected behavior**
A clear and concise description of what you expected to happen.

`noarch: python` should not be included in the `build:` section.

**Outputs**
If applicable, add the output to help explain your problem.

One example is [`remove_dagmc_tags`](https://github.com/svalinn/remove_dagmc_tags) which has the following [_setup.py_](https://github.com/svalinn/remove_dagmc_tags/blob/c529c688959647faaebba0a932f96c0c10891f61/setup.py#L17)

```python
setuptools.setup(
    name="remove_dagmc_tags",
    version="0.0.5",
    author="DAGMC development team",
    description="A tool for selectively removing tags such as the graveyard from DAGMC h5m files.",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="https://github.com/svalinn/remove_dagmc_tags",
    packages=setuptools.find_packages(),
    zip_safe=True,
    package_dir={"remove_dagmc_tags": "remove_dagmc_tags"},
    scripts=['remove_dagmc_tags/remove-dagmc-tags'],
    package_data={
        "remove_dagmc_tags": [
            "requirements.txt",
            "README.md",
            "LICENSE",
        ],
        "tests": [
            "dagmc.h5m"
        ]
    },
    install_requires=[
        "numpy"
    ],
    # pymoab is also required for this package but is not available via pip
    # install
    tests_require=["pytest-cov"],
)
```

The output here is

```yaml
build:
  number: 0
  noarch: python
  script: {{ PYTHON }} -m pip install . -vv
```

**Environment:**
 - https://www.marcelotrevisani.com/grayskull

**Additional context**
Add any other context about the problem here.


Pull request description:
[Fix #224] Added check for scripts in metadata and wrote tests
Fixes #224 


Patch:
diff --git a/grayskull/pypi/pypi.py b/grayskull/pypi/pypi.py
index 50f2b1c..536462e 100644
--- a/grayskull/pypi/pypi.py
+++ b/grayskull/pypi/pypi.py
@@ -417,6 +417,7 @@ class PyPi(AbstractRecipeModel):
             "classifiers": get_val("classifiers"),
             "compilers": PyPi._get_compilers(requires_dist, sdist_metadata),
             "entry_points": PyPi._get_entry_points_from_sdist(sdist_metadata),
+            "scripts": get_val("scripts"),
             "summary": get_val("summary"),
             "requires_python": pypi_metadata.get("requires_python")
             or sdist_metadata.get("python_requires"),
@@ -557,6 +558,12 @@ class PyPi(AbstractRecipeModel):
         )
         metadata = PyPi._merge_pypi_sdist_metadata(pypi_metadata, sdist_metadata)
         log.debug(f"Data merged from pypi, setup.cfg and setup.py: {metadata}")
+        if metadata.get("scripts") is not None:
+            self._is_arch = True
+            print_msg(
+                f"{Fore.YELLOW}scripts detected. Package not eligible for noarch."
+            )
+
         license_metadata = PyPi._discover_license(metadata)
 
         license_file = "PLEASE_ADD_LICENSE_FILE"


Test patch:
diff --git a/tests/test_pypi.py b/tests/test_pypi.py
index 797f9ad..aa712e7 100644
--- a/tests/test_pypi.py
+++ b/tests/test_pypi.py
@@ -650,3 +650,13 @@ def test_clean_deps_for_conda_forge():
 def test_empty_entry_points():
     recipe = PyPi(name="modulegraph", version="0.18")
     assert recipe["build"]["entry_points"] == "modulegraph = modulegraph.__main__:main"
+
+
+def test_noarch_metadata():
+    recipe = PyPi(name="policy_sentry", version="0.11.16")
+    assert recipe["build"]["noarch"] == "python"
+
+
+def test_arch_metadata():
+    recipe = PyPi(name="remove_dagmc_tags", version="0.0.5")
+    assert "noarch" not in recipe["build"]