# TravisCI build with Python deps

**URL:** <https://discourse.julialang.org/t/travisci-build-with-python-deps/17289>\
**Category:** Internals & Design\
**Created:** [November 8, 2018, 2:55am UTC](https://discourse.julialang.org/t/travisci-build-with-python-deps/17289 "2018-11-08T02:55:37Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)\
**Post date:** [November 8, 2018, 3:18am UTC](https://discourse.julialang.org/t/travisci-build-with-python-deps/17289/2 "2018-11-08T03:18:07Z")

</div>

If you put setups in `.travis.yml`, you’ll have trouble with CIBot when registering the package (see [The current METADATA release process](https://discourse.julialang.org/t/the-current-metadata-release-process/16672)). Maybe put something like this in your `deps/build.jl` (untested):

```julia
using Pkg

if lowercase(get(ENV, "CI", "false")) == "true"
    let basepython = get(ENV, "PYTHON", "python")
        envpath = joinpath(@ __DIR__ , "env")
        run(`virtualenv --python=$basepython $envpath`)

        if Sys.iswindows()
            python = joinpath(envpath, "Scripts", "python.exe")
        else
            python = joinpath(envpath, "bin", "python")
        end
        run(`$python -m pip install basemap`)

        ENV["PYTHON"] = python
        Pkg.build("PyCall")
    end
end

```

It’s a bit ugly to build PyCall again in your build process, but you can’t avoid it if you want to change Python path.

---

_[View the full topic](https://discourse.julialang.org/t/travisci-build-with-python-deps/17289)._
