Skip to content

Commit

Permalink
Merge branch 'master' into finderwidget
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin Peter committed Jun 22, 2022
2 parents a2bd0e6 + ede446a commit 39fc0c0
Show file tree
Hide file tree
Showing 24 changed files with 314 additions and 641 deletions.
44 changes: 5 additions & 39 deletions .github/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,9 @@ if [ "$USE_CONDA" = "true" ]; then

# To check our manifest and coverage
mamba install check-manifest codecov -c conda-forge -q -y

# Remove packages we have subrepos for.
for dep in $(ls external-deps)
do
echo "Removing $dep package"

if [ "$dep" = "qtconsole" ]; then
conda remove qtconsole-base qtconsole --force -q -y
else
conda remove $dep --force -q -y
fi
done

else
# Update pip and setuptools
python -m pip install -U pip setuptools
python -m pip install -U pip setuptools wheel build

# Install Spyder and its dependencies from our setup.py
pip install -e .[test]
Expand All @@ -56,40 +43,19 @@ else
pip install pyqt5==5.12.* pyqtwebengine==5.12.*
fi

# Remove packages we have subrepos for
for dep in $(ls external-deps)
do
echo "Removing $dep package"
pip uninstall $dep -q -y
done

# Remove Spyder to properly install it below
pip uninstall spyder -q -y
fi

# Install subrepos in development mode
for dep in $(ls external-deps)
do
echo "Installing $dep subrepo"

# This is necessary to pass our minimal required version of PyLSP to setuptools-scm
if [ "$dep" = "python-lsp-server" ]; then
SETUPTOOLS_SCM_PRETEND_VERSION=`python pylsp_utils.py` pip install --no-deps -q -e external-deps/$dep
else
pip install --no-deps -q -e external-deps/$dep
fi
done
# Install subrepos from source
python -bb -X dev -W error install_dev_repos.py --not-editable --no-install spyder

# Install boilerplate plugin
pushd spyder/app/tests/spyder-boilerplate
pip install --no-deps -q -e .
popd

# Install Spyder to test it as if it was properly installed.
# Note: `python setup.py egg_info` doesn't work here but it
# does locally.
python setup.py -q bdist_wheel
pip install --no-deps -q dist/spyder*.whl
python -bb -X dev -W error -m build
python -bb -X dev -W error -m pip install --no-deps dist/spyder*.whl

# Create environment for Jedi environments tests
mamba create -n jedi-test-env -q -y python=3.6 flask spyder-kernels
Expand Down
13 changes: 2 additions & 11 deletions .github/workflows/installer-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,11 @@ jobs:
if [[ -z ${LITE_FLAG} ]]; then
INSTALL_FLAGS+=('-r' 'req-scientific.txt')
fi
${pythonLocation}/bin/python -m pip install -U pip setuptools wheel
${pythonLocation}/bin/python -m pip install -U pip setuptools
${pythonLocation}/bin/python -m pip install -r req-build.txt -r req-extras.txt -r req-plugins.txt "${INSTALL_FLAGS[@]}" -e ${GITHUB_WORKSPACE}
- name: Install Subrepos
if: ${{github.event_name == 'pull_request'}}
run: |
for dep in $(ls ${GITHUB_WORKSPACE}/external-deps)
do
if [ "$dep" = "python-lsp-server" ]; then
SETUPTOOLS_SCM_PRETEND_VERSION=`${pythonLocation}/bin/python ${GITHUB_WORKSPACE}/pylsp_utils.py` \
${pythonLocation}/bin/python -m pip install ${GITHUB_WORKSPACE}/external-deps/$dep
else
${pythonLocation}/bin/python -m pip install ${GITHUB_WORKSPACE}/external-deps/$dep
fi
done
run: ${pythonLocation}/bin/python -bb -X dev -W error ${GITHUB_WORKSPACE}/install_dev_repos.py --not-editable --no-install spyder
- name: Show Build Environment
run: |
${pythonLocation}/bin/python -V -V
Expand Down
37 changes: 12 additions & 25 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,52 +38,39 @@ Finally, set the upstream remote to the official Spyder repo with:
$ git remote add upstream https://github.com/spyder-ide/spyder.git
```

### Creating a conda environment or virtualenv

If you use Anaconda you can create a conda environment with the following commands:
### Creating an environment and installing dependencies

```bash
$ conda create -n spyder-dev python=3
$ conda activate spyder-dev
```

You can also use `virtualenv` on Linux, but `conda` is **strongly** recommended:
If you use a Conda-based distribution (Anaconda, etc), you can create an environment and install the necessary dependencies as follows:

```bash
$ mkvirtualenv spyder-dev
$ workon spyder-dev
$ conda create -n spyder-dev -c conda-forge --file requirements/conda.txt
$ conda activate spyder-dev
```


### Installing dependencies

After you have created your development environment, you need to install Spyder's necessary dependencies. The easiest way to do so (with Anaconda) is
If you are running on macOS, you will also need to install `python.app`, so after activating the environment, run

```bash
$ conda install -c conda-forge --file requirements/conda.txt
$ conda install -c conda-forge python.app
```

This installs all Spyder's dependencies into the environment.
If you are running on macOS, you will also need to install `python.app`.
You can also use `virtualenv` on Linux, but `conda` is **strongly** recommended:

```bash
$ conda install python.app
$ mkvirtualenv spyder-dev
$ workon spyder-dev
(spyder-dev) $ pip install -e .
```

If using `pip` and `virtualenv` (not recommended), you need to `cd` to the directory where your git clone is stored and run:

```bash
$ pip install -e .
```

### Running Spyder

To start Spyder directly from your clone, i.e. without installing it into your environment, you need to run (from the directory you cloned it to e.g. `spyder`):
To run Spyder from your clone in its development mode, with extra checks and options (pass `--help` to see them), launch it via the `bootstrap.py` script in the repo root directory:

```bash
$ python bootstrap.py
```
Note that if you are running on macOS, you will need to call `pythonw` instead of `python`.
Note that if you are running on macOS 10.15 or earlier, you will need to call `pythonw` instead of `python`.

To start Spyder in debug mode, useful for tracking down an issue, you can run:

Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ include changelogs/Spyder-5.md
include AUTHORS.txt
include NOTICE.txt
include bootstrap.py
include pylsp_utils.py
include install_dev_repos.py
4 changes: 2 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ To release a new version of Spyder you need to follow these steps:

* Update the version of any packages required before the release in the following files:

- `setup.py` (look up for the Windows installer patch too)
- `setup.py` (look up for the `install_requires` variable and also for the `Loosen constraints to ensure dev versions still work` patch )
- `spyder/dependencies.py`
- `requirements/conda.txt`
- `binder/environment.yml`
- *`spyder/plugins/ipythonconsole/widgets/main_widget.py` (look up for the constants `SPYDER_KERNELS_MIN_VERSION` and `SPYDER_KERNELS_MAX_VERSION`)
- `spyder/plugins/ipythonconsole/widgets/main_widget.py` (look up for the constants `SPYDER_KERNELS_MIN_VERSION` and `SPYDER_KERNELS_MAX_VERSION`)

**Note**: Usually, the version of `spyder-kernels` for validation in the IPython Console only needs to be updated for minor or major releases of that package. For bugfix releases the value should remain the same to not hassle users using custom interpreters into updating `spyder-kernels` in their environments. However, this depends on the type of bugs resolved and if it's worthy to reinforce the need of an update even for those versions.

Expand Down
Loading

0 comments on commit 39fc0c0

Please sign in to comment.