diff --git a/.github/workflows/scripts/before_install.sh b/.github/workflows/scripts/before_install.sh index f00baa7..2c92cf6 100755 --- a/.github/workflows/scripts/before_install.sh +++ b/.github/workflows/scripts/before_install.sh @@ -30,7 +30,7 @@ fi COMMIT_MSG=$(git log --format=%B --no-merges -1) export COMMIT_MSG -COMPONENT_VERSION=$(sed -ne "s/\s*version.*=.*['\"]\(.*\)['\"][\s,]*/\1/p" setup.py) +COMPONENT_VERSION=$(python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])") mkdir .ci/ansible/vars || true echo "---" > .ci/ansible/vars/main.yaml @@ -61,10 +61,10 @@ then fi if [[ "$TEST" = "pulp" ]]; then - python3 .ci/scripts/calc_constraints.py -u requirements.txt > upperbounds_constraints.txt + python3 .ci/scripts/calc_constraints.py -u pyproject.toml > upperbounds_constraints.txt fi if [[ "$TEST" = "lowerbounds" ]]; then - python3 .ci/scripts/calc_constraints.py requirements.txt > lowerbounds_constraints.txt + python3 .ci/scripts/calc_constraints.py pyproject.toml > lowerbounds_constraints.txt fi if [ -f $POST_BEFORE_INSTALL ]; then diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..382e21a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,15 @@ +## Contributing + +We have provided detailed documentation for ways in which you can +contribute to Pulp here: +https://docs.pulpproject.org/contributing/ + +This documentation includes: + +* Suggestions of how to contribute +* How we track bugs +* Ways to get in touch with other contributors who can advise you +* A contribution checklist +* A developer guide + +Join us! We look forward to hearing from you. diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst deleted file mode 100644 index e3aec5f..0000000 --- a/CONTRIBUTING.rst +++ /dev/null @@ -1,35 +0,0 @@ -Contributing -============ - -To contribute to the ``pulp-npm`` package follow this process: - -1. Clone the GitHub repo -2. Make a change -3. Make sure all tests passed -4. Add a file into CHANGES folder (Changelog update). -5. Commit changes to own ``pulp_npm`` clone -6. Make pull request from github page for your clone against master branch - - -.. _changelog-update: - -Changelog update -**************** - -The CHANGES.rst file is managed using the `towncrier tool `_ -and all non trivial changes must be accompanied by a news entry. - -To add an entry to the news file, you first need an issue in pulp.plan.io describing the change you -want to make. Once you have an issue, take its number and create a file inside of the ``CHANGES/`` -directory named after that issue number with an extension of .feature, .bugfix, .doc, .removal, or -.misc. So if your issue is 3543 and it fixes a bug, you would create the file -``CHANGES/3543.bugfix``. - -PRs can span multiple categories by creating multiple files (for instance, if you added a feature -and deprecated an old feature at the same time, you would create CHANGES/NNNN.feature and -CHANGES/NNNN.removal). Likewise if a PR touches multiple issues/PRs you may create a file for each -of them with the exact same contents and Towncrier will deduplicate them. - -The contents of this file are reStructuredText formatted text that will be used as the content of -the news file entry. You do not need to reference the issue or PR numbers here as towncrier will -automatically add a reference to all of the affected issues when rendering the news file. diff --git a/HISTORY.rst b/HISTORY.rst deleted file mode 100644 index 8b13789..0000000 --- a/HISTORY.rst +++ /dev/null @@ -1 +0,0 @@ - diff --git a/MANIFEST.in b/MANIFEST.in index 962cd61..878c969 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,6 @@ include CHANGES.md include COMMITMENT +exclude CONTRIBUTING.md include COPYRIGHT include LICENSE include functest_requirements.txt diff --git a/pyproject.toml b/pyproject.toml index 0b6b6d6..2d6f181 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,45 @@ +[build-system] +requires = [ + "setuptools >= 40.8.0", + "wheel >= 0.29.0", +] +build-backend = 'setuptools.build_meta' + +[project] +name = "pulp-npm" +version = "0.1.0a5.dev" +description = "pulp-npm plugin for the Pulp Project" +readme = "README.md" +authors = [ + {name="Pulp Team", email="pulp-list@redhat.com"}, +] +classifiers=[ + "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", + "Operating System :: POSIX :: Linux", + "Framework :: Django", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", +] +requires-python = ">=3.6" +dependencies = [ + "pulpcore>=3.28.15,<3.70", +] + +[project.urls] +Homepage = "https://pulpproject.org" +Documentation = "https://pulpproject.org/pulp_npm/" +Repository = "https://github.com/pulp/pulp_npm" +"Bug Tracker" = "https://github.com/pulp/pulp_npm/issues" +Changelog = "https://pulpproject.org/pulp_npm/changes/" + +[project.entry-points."pulpcore.plugin"] +pulp_npm = "pulp_npm:default_app_config" + +[tool.setuptools.packages.find] +where = ["."] + [tool.towncrier] package = "pulp_npm" filename = "CHANGES.md" @@ -10,10 +52,7 @@ underlines = ["", "", ""] [tool.check-manifest] ignore = [ - ".bumpversion.cfg", "CHANGES/**", - "CONTRIBUTING.rst", - "HISTORY.rst", "dev_requirements.txt", "doc_requirements.txt", "docs/**", @@ -84,4 +123,8 @@ search = "version = \"{current_version}\"" replace = "version = \"{new_version}\"" [[tool.bumpversion.files]] -filename = "./setup.py" \ No newline at end of file +# This section is managed by the plugin template. Do not edit manually. + +filename = "./pyproject.toml" +search = "version = \"{current_version}\"" +replace = "version = \"{new_version}\"" \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 2e59153..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -pulpcore>=3.28.15,<3.70 diff --git a/setup.py b/setup.py deleted file mode 100755 index 4d9d7fe..0000000 --- a/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -from setuptools import find_packages, setup - -with open("README.md") as f: - long_description = f.read() - -with open("requirements.txt") as requirements: - requirements = requirements.readlines() - -setup( - name="pulp-npm", - version="0.1.0a5.dev", - description="pulp-npm plugin for the Pulp Project", - long_description=long_description, - long_description_content_type="text/markdown", - license="GPLv2+", - author="Pulp NPM Plugin Project Developers", - author_email="pulp-dev@redhat.com", - url="https://github.com/pulp/pulp_npm", - python_requires=">=3.6", - install_requires=requirements, - include_package_data=True, - packages=find_packages(exclude=["tests", "tests.*"]), - classifiers=( - "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", - "Operating System :: POSIX :: Linux", - "Framework :: Django", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - ), - entry_points={"pulpcore.plugin": ["pulp_npm = pulp_npm:default_app_config"]}, -)