Skip to content
Snippets Groups Projects
Commit dae80a17 authored by Yoann Schneider's avatar Yoann Schneider :tennis: Committed by Bastien Abadie
Browse files

Publish pypi

parent b3a05156
No related branches found
No related tags found
1 merge request!407Publish pypi
......@@ -152,17 +152,12 @@ deploy-pypi:
only:
- tags
variables:
TWINE_USERNAME: gitlab-ci-token
TWINE_PASSWORD: ${CI_JOB_TOKEN}
TWINE_REPOSITORY_URL: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi
before_script:
- pip install twine
script:
- python setup.py sdist bdist_wheel
- twine upload --repository-url ${TWINE_REPOSITORY_URL} dist/*
- twine upload -r pypi dist/*
bump-python-deps:
stage: deploy
......
......@@ -2,26 +2,14 @@
## Installation
DAN is published on a GitLab package registry.
You need [a personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with [scope](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#personal-access-token-scopes) `read_api` in order to install this module. You will need to add the below to your `~/.netrc` file:
```shell
machine gitlab.teklia.com
login __token__
password <YOUR_PERSONAL_TOKEN>
```
### As a dependency
To install DAN as a dependency, you need to first add the following line to your `requirements.txt` file:
```shell
--index-url https://gitlab.teklia.com/api/v4/projects/98/packages/pypi/simple
teklia-dan
atr-dan
```
The `--index-url` argument is required to find the `DAN` package.
Then you can install it via pip:
```shell
......@@ -33,11 +21,9 @@ pip install -r requirements.txt
To install DAN directly, you can install it via pip:
```shell
pip install --index-url https://gitlab.teklia.com/api/v4/projects/98/packages/pypi/simple teklia-dan
pip install atr-dan
```
The `--index-url` argument is required to find the `DAN` package.
---
To learn more about the newly installed `teklia-dan` command, make sure to run:
......
......@@ -34,14 +34,14 @@ def parse_requirements(filename: str) -> List[str]:
setup(
name="teklia-dan",
name="atr-dan",
version=Path("VERSION").read_text(),
description="Teklia DAN",
long_description=Path("README.md").read_text(),
long_description_content_type="text/markdown",
author="Teklia",
author_email="contact@teklia.com",
url="https://gitlab.com/teklia/atr/dan",
url="https://gitlab.teklia.com/atr/dan",
python_requires=">=3.10",
install_requires=parse_requirements("requirements.txt"),
packages=find_packages(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment