CI: Use conda compiler in `environment.yml`
State: closed

Improvement to the conda environment to use the compiler from the virtual env instead of the system

Using the ``cxx-compile`` would be better because it will use the compiler from the virtual environment and it will not rely on the system anymore. That would be great to also avoid any kind of abi problems if someone uses some old compiler

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: CI
description: Continuous Integration
name: Dependencies
description: Required and optional dependencies

Comments:
https://github.com/pandas-dev/pandas/pull/27061 should be merged first, after that I can rebase from ``main``
For example, it will use the compiler from the conda virtual environment
```
/home/trevisani/miniconda3/envs/pandas-dev/bin/x86_64-conda_cos6-linux-gnu-cc -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -fPIC -DNPY_NO_DEPRECATED_API=0 -I/home/trevisani/miniconda3/envs/pandas-dev/lib/python3.7/site-packages/numpy/core/include -I/home/trevisani/miniconda3/envs/pandas-dev/include/python3.7m -c pandas/util/move.c -o build/temp.linux-x86_64-3.7/pandas/util/move.o -Wno-unused-function
x86_64-conda_cos6-linux-gnu-gcc -pthread -shared -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/home/trevisani/miniconda3/envs/pandas-dev/lib -L/home/trevisani/miniconda3/envs/pandas-dev/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/home/trevisani/miniconda3/envs/pandas-dev/lib -L/home/trevisani/miniconda3/envs/pandas-dev/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 build/temp.linux-x86_64-3.7/pandas/util/move.o -o /home/trevisani/pandas/pandas/pandas/util/_move.cpython-37m-x86_64-linux-gnu.so

```

That would be multiplatform as well, in that way it will isolate the compilation process from the system

As you can see it is using this compiler ``/home/trevisani/miniconda3/envs/pandas-dev/bin/x86_64-conda_cos6-linux-gnu-cc ``
Still need some work, the CI is getting the compiler from the system, at least for ``osx``
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/27062?src=pr&el=h1) Report
> Merging [#27062](https://codecov.io/gh/pandas-dev/pandas/pull/27062?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/ff50b46045886604dd70438f73df7bf9da3da89b?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/27062/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/27062?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #27062      +/-   ##
==========================================
- Coverage   92.04%   92.03%   -0.01%     
==========================================
  Files         180      180              
  Lines       50713    50713              
==========================================
- Hits        46680    46676       -4     
- Misses       4033     4037       +4
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.68% <ø> (ø)` | :arrow_up: |
| #single | `41.86% <ø> (-0.09%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/27062?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/27062/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `88.88% <0%> (-11.12%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/27062/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `96.89% <0%> (-0.12%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/27062?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/27062?src=pr&el=footer). Last update [ff50b46...d810dda](https://codecov.io/gh/pandas-dev/pandas/pull/27062?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/27062?src=pr&el=h1) Report
> Merging [#27062](https://codecov.io/gh/pandas-dev/pandas/pull/27062?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/88ccb25e74c5e88bc393fa15790d341574f2bff8?src=pr&el=desc) will **decrease** coverage by `1.19%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/27062/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/27062?src=pr&el=tree)

```diff
@@            Coverage Diff            @@
##           master   #27062     +/-   ##
=========================================
- Coverage   92.98%   91.78%   -1.2%     
=========================================
  Files         184      180      -4     
  Lines       50362    50934    +572     
=========================================
- Hits        46827    46752     -75     
- Misses       3535     4182    +647
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.48% <ø> (-1.17%)` | :arrow_down: |
| #single | `42.01% <ø> (-0.48%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/27062?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/27062/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `88.88% <0%> (-11.12%)` | :arrow_down: |
| [pandas/util/\_decorators.py](https://codecov.io/gh/pandas-dev/pandas/pull/27062/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvX2RlY29yYXRvcnMucHk=) | `92.13% <0%> (-3.22%)` | :arrow_down: |
| [pandas/core/dtypes/cast.py](https://codecov.io/gh/pandas-dev/pandas/pull/27062/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2Nhc3QucHk=) | `91.05% <0%> (-2.01%)` | :arrow_down: |
| [pandas/core/indexing.py](https://codecov.io/gh/pandas-dev/pandas/pull/27062/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhpbmcucHk=) | `93% <0%> (-1.82%)` | :arrow_down: |
| [pandas/core/dtypes/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/27062/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2NvbW1vbi5weQ==) | `96.35% <0%> (-1.44%)` | :arrow_down: |
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/27062/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `92.5% <0%> (-1.17%)` | :arrow_down: |
| [pandas/core/groupby/ops.py](https://codecov.io/gh/pandas-dev/pandas/pull/27062/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9vcHMucHk=) | `96% <0%> (-0.92%)` | :arrow_down: |
| [pandas/core/tools/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/27062/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvdG9vbHMvZGF0ZXRpbWVzLnB5) | `85.05% <0%> (-0.74%)` | :arrow_down: |
| [pandas/core/internals/blocks.py](https://codecov.io/gh/pandas-dev/pandas/pull/27062/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzL2Jsb2Nrcy5weQ==) | `95.01% <0%> (-0.58%)` | :arrow_down: |
| [pandas/core/arrays/categorical.py](https://codecov.io/gh/pandas-dev/pandas/pull/27062/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2NhdGVnb3JpY2FsLnB5) | `95.95% <0%> (-0.51%)` | :arrow_down: |
| ... and [160 more](https://codecov.io/gh/pandas-dev/pandas/pull/27062/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/27062?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/27062?src=pr&el=footer). Last update [88ccb25...27fa92e](https://codecov.io/gh/pandas-dev/pandas/pull/27062?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Hello @marcelotrevisani! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:

* In the file [`pandas/__init__.py`](https://github.com/pandas-dev/pandas/blob/a8eabf9d110a7c1069d84b282da49437184d971b/pandas/__init__.py):

> [Line 165:16](https://github.com/pandas-dev/pandas/blob/a8eabf9d110a7c1069d84b282da49437184d971b/pandas/__init__.py#L165): [E131](https://duckduckgo.com/?q=pep8%20E131) continuation line unaligned for hanging indent
> [Line 166:28](https://github.com/pandas-dev/pandas/blob/a8eabf9d110a7c1069d84b282da49437184d971b/pandas/__init__.py#L166): [E131](https://duckduckgo.com/?q=pep8%20E131) continuation line unaligned for hanging indent
> [Line 168:67](https://github.com/pandas-dev/pandas/blob/a8eabf9d110a7c1069d84b282da49437184d971b/pandas/__init__.py#L168): [W292](https://duckduckgo.com/?q=pep8%20W292) no newline at end of file



##### Comment last updated at 2019-07-02 07:38:21 UTC
I will squash my commits when it is ready to be integrated.
I just found one problem with Linux, for some reason one of the builds is still using the compiler from the system. It needs more investigation
> I will squash my commits when it is ready to be integrated.

No need to squash, we do that on merge.
@marcelotrevisani is this still active? Can you merge master?
> @marcelotrevisani is this still active? Can you merge master?

Sure, during this weekend I will have some time and I am going to do it
@marcelotrevisani can you rebase
@marcelotrevisani we have had a fair amount of CI churn recently, so if you can merge master we can look again 
Nice PR but I think this has gone stale. @marcelotrevisani ping if you'd like to pick this back up