Repository: dmwm/wmcore
Issue: Missing /etc/ && /bin/ && /src/ toplevel areas in the pypi packages

**Impact of the bug**
Python based deployment

**Describe the bug**
While  working on the deployment of `wmagent`  through `pypi` packages only, I've stumbled on the missing `/etc`, `/bin`  and `/src` top level areas in the finally deployed python package. Even though `/etc/` is listed for packaging here: 
https://github.com/dmwm/WMCore/blob/31d65166dc62c7251edd52890bc4ac2f0b79d7fe/setup_build.py#L122 
it is missing from the packaged source in the tar file. 

Here is the actual content of the package: [1]
[1]
```
(WMCore.venv3) [user@unit02 wmagent-2.2.0.5]$ tree -L 2
.
├── bin
│   ├── acdcserver-tools
│   ├── adhoc-scripts
│   ├── attempt-to-patch.sh
...
│   ├── wmcore-new-config
│   └── wmcore-new-flow
├── LICENSE
├── MANIFEST.in
├── NOTICE
├── PKG-INFO
├── README.md
├── requirements.txt
├── setup_build.py
├── setup.cfg
├── setup_dependencies.py
├── setup.py
└── src
    ├── couchapps
    ├── css
    ├── javascript
    ├── python
    └── templates
```

The other missing bit is `/bin/`, but this time the directory is actually present in the pypi package: [1], but is not installed with pip. The bellow command returns no result:
```
(WMAgent.dock) [cmst1@unit01:/data/srv/wmagent/current]$ find / -name adhoc-scripts
```
Same with the `/src` area - missing in the finally deployed package, while present at the package tar file:
```
(WMAgent.dock) [cmst1@unit01:/data/srv/wmagent/current]$ find / -name couchapps
```

The impact of missing the two top level areas from the finally deployed python package is different, and for one of them is more severe than for the other:
* The lack of `/etc` in the package concerns only the missing agent config templates, which are a matter of a single download from source at build time for the docker image. While,
* The lack of `/bin` in the package is a blocker, because it is preventing any `$manage` command to be executed at the agent and is a matter of several files rather than a single template. 
* The lack of `/src` in the the finally installed package is a blocker for the CouchDB initialization step at the agent. Here is the error that we observe:
```
wmcoreroot: /usr/local
develPath; /usr/local/lib/python3.8/site-packages/src/couchapps
Traceback (most recent call last):
  File "/data/srv/wmagent/current/install/wmagent/bin/wmagent-couchapp-init", line 294, in <module>
    installCouchApp(wmagentConfig.JobStateMachine.couchurl, fwjrDumpName, "FWJRDump")
  File "/data/srv/wmagent/current/install/wmagent/bin/wmagent-couchapp-init", line 54, in installCouchApp
    basePath = couchAppRoot(couchAppName)
  File "/data/srv/wmagent/current/install/wmagent/bin/wmagent-couchapp-init", line 34, in couchAppRoot
    raise OSError('Cannot find couchapp: %s' % couchapp)
OSError: Cannot find couchapp: FWJRDump
Done: Performing init_agent
```

A temporary workaround has been implemented in the `CMSKubernetes` repository for some parts of the problem (namely `/etc` && `/bin`), with the following commit: https://github.com/dmwm/CMSKubernetes/pull/1364/commits/367370f72a470d4d9706d86998ad30b9b3e863d7 , but this must go away ASAP. 


**How to reproduce it**
Setup the wmagent pypi package with: `pip install wmagent==2.2.0.2` and try to find the WMCore `/bin/` and  `/etc/` directories or anything from their content.

to check the actual content of the package, just download the it directly from pypi (e.g. [Pypi/wmagent-2.2.0.5.tar.gz](https://files.pythonhosted.org/packages/2f/9b/6a964d034fb13407cef1eb7bb430ddb6e99ced31a0eb9ec5cb1c3fc2216b/wmagent-2.2.0.5.tar.gz)), untar/zip it and look at the contents.

**Expected behavior**
The package to contain the `/etc` and `/bin` top level areas of WMCore. 

**Additional context and error message**
These two issues are blockers for completing the python based deployment for the `wmagent` package:
https://github.com/dmwm/WMCore/issues/11564
https://github.com/dmwm/WMCore/issues/8797

Part of the following meta issue: https://github.com/dmwm/WMCore/issues/11314

Changed files:
setup_dependencies.py

diff --git a/setup_dependencies.py b/setup_dependencies.py
index b6ed40156..bf283e3ee 100644
--- a/setup_dependencies.py
+++ b/setup_dependencies.py
@@ -188,7 +188,15 @@ dependencies = {
                      'WMCore.Services+', 'WMCore.WMSpec+',
                      'WMCore.WMBS+', 'WMCore.ResourceControl+'],
         'systems': ['wmc-web', 'wmc-database', 'global-workqueue', 'wmc-runtime'],
-        'statics': ['src/javascript/WMCore/WebTools/Agent',
+        'statics': ['bin+',
+                    'deploy+',
+                    'etc+',
+                    'src/couchapps/SummaryStats+',
+                    'src/couchapps/FWJRDump+',
+                    'src/couchapps/JobDump+',
+                    'src/couchapps/WMStatsAgent+',
+                    'src/couchapps/WorkQueue+',
+                    'src/javascript/WMCore/WebTools/Agent',
                     'src/javascript/WMCore/WebTools/WMBS',
                     'src/javascript/external/graphael',
                     'src/templates/WMCore/WebTools/WMBS'],