{"id":20940410,"url":"https://github.com/fedora-python/pyp2rpm","last_synced_at":"2025-10-07T03:13:14.732Z","repository":{"id":40680393,"uuid":"39019167","full_name":"fedora-python/pyp2rpm","owner":"fedora-python","description":"Tool to convert a package from PyPI to RPM SPECFILE or to generate SRPM.","archived":false,"fork":false,"pushed_at":"2023-10-04T04:13:45.000Z","size":3199,"stargazers_count":130,"open_issues_count":59,"forks_count":42,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-03-29T07:48:40.440Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fedora-python.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-07-13T15:03:09.000Z","updated_at":"2025-02-27T09:08:18.000Z","dependencies_parsed_at":"2024-06-21T02:14:45.131Z","dependency_job_id":"d81f8cbc-e7b6-4dfa-ace5-c7dc0b912f64","html_url":"https://github.com/fedora-python/pyp2rpm","commit_stats":{"total_commits":589,"total_committers":23,"mean_commits":"25.608695652173914","dds":0.6960950764006791,"last_synced_commit":"92399daa509d2769433f97cf7f07209f738139a2"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedora-python%2Fpyp2rpm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedora-python%2Fpyp2rpm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedora-python%2Fpyp2rpm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedora-python%2Fpyp2rpm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fedora-python","download_url":"https://codeload.github.com/fedora-python/pyp2rpm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247430871,"owners_count":20937874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T23:10:16.488Z","updated_at":"2025-10-07T03:13:09.708Z","avatar_url":"https://github.com/fedora-python.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n![Logo](https://rkuska.fedorapeople.org/pyp2rpm_large.png)\n\npyp2rpm\n=======\n\nA tool to convert a PyPI package to an RPM `SPECFILE` or to generate an SRPM.\nUnder heavy development, see the TODO file for a list of planned features.\npyp2rpm currently ships with Fedora and Mageia specific templates.\n\n## Usage\n\nThe simplest use case is to run:\n```sh\npyp2rpm package_name\n```\n\nThis downloads the package from PyPI and outputs the RPM `SPECFILE`.\n\nOr:\n```sh\npyp2rpm package_name --srpm\n```\n\nThis downloads the package from PyPI and creates a SRPM file.\n\nAll of the `pyp2rpm` options are:\n\n    $ pyp2rpm -h\n\n    usage: pyp2rpm [-h] [-v VERSION] [-d SAVE_DIR] [-r RPM_NAME]\n                   [-t TEMPLATE] [-o DISTRO] [-b BASE_PYTHON]\n                   [-p PYTHON_VERSION] [--srpm] [--proxy PROXY] PACKAGE\n\n    Convert PyPI package to RPM specfile or SRPM.\n\n    Arguments:\n      PACKAGE             Provide PyPI name of the package or path to compressed\n                          source file.\n\n    Options:\n      -t TEMPLATE                     Template file (jinja2 format) to render\n                                      (default: \"fedora\").Search order is 1)\n                                      filesystem, 2) default templates.\n      -o [fedora|epel7|epel6|mageia|pld]\n                                      Default distro whose conversion rules to use\n                                      (default:\"fedora\"). Default templates have\n                                      their rules associated and ignore this.\n      -b BASE_PYTHON                  Base Python version to package for (fedora\n                                      default: \"3\").\n      -p PYTHON_VERSIONS              Additional Python versions to include in the\n                                      specfile (e.g -p2 for python2 subpackage).\n                                      Can be specified multiple times. Specify\n                                      additional version or use -b explicitly to\n                                      disable default.\n      -s                              Spec file ~/rpmbuild/SPECS/python-package_name.spec\n                                      will be created (default:\n                                      prints spec file to stdout).\n      --srpm                          When used pyp2rpm will produce srpm instead\n                                      of printing specfile into stdout.\n      --proxy PROXY                   Specify proxy in the form proxy.server:port.\n      -r RPM_NAME                     Name of rpm package (overrides calculated\n                                      name).\n      -d SAVE_PATH                    Specify where to save package file, specfile\n                                      and generated SRPM (default:\n                                      \"/home/mcyprian/rpmbuild\").\n      -v VERSION                      Version of the package to download (ignored\n                                      for local files).\n      --venv / --no-venv              Enable / disable metadata extraction from\n                                      virtualenv (default: enabled).\n      --autonc / --no-autonc          Enable / disable using automatic provides\n                                      with a standardized name in dependencies\n                                      declaration (default: disabled).\n      --sclize                        Convert tags and macro definitions to SCL-style\n                                      using `spec2scl` module. NOTE: SCL\n                                      related options can be provided alongside\n                                      this option.\n      -h, --help                      Show this message and exit.\n\n    SCL related options:\n      --no-meta-runtime-dep       Don't add the runtime dependency on the scl\n                                  runtime package.\n      --no-meta-buildtime-dep     Don't add the buildtime dependency on the scl\n                                  runtime package.\n      --skip-functions FUNCTIONS  Comma separated list of transformer functions to\n                                  skip.\n      --no-deps-convert           Don't convert dependency tags (mutually\n                                  exclusive with --list-file).\n      --list-file FILE_NAME       List of the packages/provides, that will be in\n                                  the SCL (to convert Requires/BuildRequires\n                                  properly). Lines in the file are in form of\n                                  \"pkg-name %%{?custom_prefix}\", where the prefix\n                                  part is optional.\n\n\nTo run the unit tests, cd into the checked out directory and run:\n```sh\nPYTHONPATH=\"$(pwd)\" py.test\n```\n\nor run:\n```sh\npython setup.py test\n```\n\n\n## Example usage\n\n![alt tag](https://mcyprian.fedorapeople.org/pyp2rpm_guide.gif\n\"Record of pyp2rpm usage\")\n\n## Contributing\n\nWe will gladly accept any pull request or feature request.\nWith complex pull requests, please include unit tests in *pytest* and use *flexmock* if you need mocking.\n\nTests can be run in a local container:\n\n```sh\ndocker build -t pyp2rpm-test .\ndocker run -v \"$(pwd):$(pwd):z\" -w \"$(pwd)\" -it pyp2rpm-test\n```\n\npyp2rpm is licensed under the MIT/Expat license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffedora-python%2Fpyp2rpm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffedora-python%2Fpyp2rpm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffedora-python%2Fpyp2rpm/lists"}