From dae80a17d56a4c024bc4da3867caf296304dfc19 Mon Sep 17 00:00:00 2001 From: Yoann Schneider <yschneider@teklia.com> Date: Mon, 6 May 2024 11:36:45 +0000 Subject: [PATCH] Publish pypi --- .gitlab-ci.yml | 7 +------ docs/get_started/index.md | 18 ++---------------- setup.py | 4 ++-- 3 files changed, 5 insertions(+), 24 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5871b91a..cec5c0e9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/docs/get_started/index.md b/docs/get_started/index.md index c46de2db..fb393e19 100644 --- a/docs/get_started/index.md +++ b/docs/get_started/index.md @@ -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: diff --git a/setup.py b/setup.py index 7ff5de4f..97763adb 100755 --- a/setup.py +++ b/setup.py @@ -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(), -- GitLab