Skip to content

Commit

Permalink
Go back to regular pip (#1702)
Browse files Browse the repository at this point in the history
* Go back to regular flit

Co-authored-by: Isaac Virshup <ivirshup@gmail.com>
  • Loading branch information
2 people authored and Zethson committed Mar 15, 2021
1 parent d4f7d4c commit 3db4814
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 23 deletions.
8 changes: 3 additions & 5 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
- script: |
python -m pip install --upgrade pip
pip install -r .pip-2033.txt
pip install pytest-cov wheel
pip install .[dev,doc,test,louvain,leiden,magic,scvi,harmony,scrublet,scanorama]
displayName: 'Install dependencies'
Expand Down Expand Up @@ -96,14 +95,13 @@ jobs:

- script: |
python -m pip install --upgrade pip
pip install setuptools setuptools_scm pytoml wheel twine
displayName: 'Install build dependencies'
pip install build twine
displayName: 'Install build tools and requirements'
- script: pip list
displayName: 'Display installed versions'

- script: |
pip install flit
flit build
python -m build --sdist --wheel .
twine check dist/*
displayName: 'Build & Twine check'
4 changes: 0 additions & 4 deletions .pip-2033.txt

This file was deleted.

1 change: 0 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ sphinx:
python:
version: 3.8
install:
- requirements: .pip-2033.txt
- method: pip
path: .
extra_requirements:
Expand Down
15 changes: 5 additions & 10 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,28 +41,23 @@ cloned version after you update with `git pull`) call::

.. _on GitHub: https://github.com/theislab/scanpy

.. note::

Due to a `bug in pip`_, packages installed by `flit` can be uninstalled by normal pip operations.
For now, you can avoid this by using::

pip install -e ".[dev,doc,test]"

.. _bug in pip: https://github.com/pypa/pip/issues/9670

If you want to let conda_ handle the installations of dependencies, do::

pip install beni
beni pyproject.toml > environment.yml
conda env create -f environment.yml
conda activate scanpy
flit install -s --deps=develop # or: pip install -e ".[dev,doc,test]"
flit install -s --deps=develop

On Windows, you might have to use `flit install --pth-file`
if you are not able to give yourself the `create symbolic links`_ privilege.

.. _create symbolic links: https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/create-symbolic-links

.. note::

`pip install -e` still works, but may not in future versions.

Docker
~~~~~~
If you're using Docker_, you can use e.g. the image `gcfntnu/scanpy`_ from Docker Hub.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build-system]
build-backend = 'flit_core.buildapi'
requires = [
'flit_core >=2,<4',
'flit_core >=3.1,<4',
'setuptools_scm',
'pytoml',
'importlib_metadata>=0.7; python_version < "3.8"',
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ def setup_args(config_path=Path("pyproject.toml")):
if "develop" in sys.argv:
msg = (
"Please use `flit install -s` or `flit install --pth-file` "
"instead of `pip install -e`/`python setup.py develop` "
"once https://github.com/pypa/pip/issues/9670 is fixed."
"instead of `pip install -e`/`python setup.py develop`"
)
elif "install" in sys.argv:
msg = 'Please use `pip install "$d"` instead of `python "$d/setup.py" install`'
Expand Down

0 comments on commit 3db4814

Please sign in to comment.