Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
527ca7a
Add the capability to build Python (PyPI) packages directly.
dralley Jun 21, 2018
4311a8e
cmake: Support building libcreaterepo_c statically
jcfr Jul 29, 2018
1227830
cmake: Include OPENSSL_INCLUDE_DIR to support building against custom…
jcfr Jul 29, 2018
6f77806
cmake: Ensure _createrepo_c is weakly linked against python library i…
jcfr Jul 29, 2018
a4eee6b
setup.py: Set BUILD_LIBCREATEREPO_C_SHARED to OFF
jcfr Jul 29, 2018
e47a89a
setup.py: Fix egg_info build error updating mapping of package to sou…
jcfr Jul 29, 2018
9280ebe
Build and distribute the binaries, too.
dralley Jul 30, 2018
fe5a306
setup.py: Set ENABLE_BASHCOMP option instead of checking for SKBUILD
jcfr Jul 30, 2018
717b965
cmake: Introduce CREATEREPO_C_INSTALL_MANPAGES option
jcfr Jul 30, 2018
399975f
cmake: Introduce CREATEREPO_C_INSTALL_DEVELOPMENT option
jcfr Jul 30, 2018
cdf910c
cmake: Introduce BIN_INSTALL_DIR to allow customization of executable…
jcfr Jul 30, 2018
56eb1ca
setup.py: Add entrypoints for each repo_c executable
jcfr Jul 30, 2018
3b67fc3
Add requirements-dev.txt
jcfr Jul 30, 2018
58a4505
setup.py: Support building against Python 2 and Python 3
jcfr Jul 30, 2018
e804553
Change conditionals a bit
dralley Jul 30, 2018
8c90040
Add this block back, it's necessary for non-python builds
dralley Jul 30, 2018
9b5b5f2
Bump minimum required cmake to 2.8
dralley Jul 31, 2018
bf5b805
Move Python __init__.py into src/python/createrepo_c
dralley Jul 31, 2018
7f1fb86
Fix __init__.py when used in a non-Python package context
dralley Jul 31, 2018
85a8615
Remove complicated logic for handling editable installs
dralley Aug 2, 2018
5d6c5e9
Add code to setup.py to parse version from VERSION.cmake
dralley Aug 2, 2018
c018c70
README snippet
dralley Aug 2, 2018
5a87e04
Use splitlines() instead of split()
dralley Aug 9, 2018
0cb6fc4
Python bindings don't support deltarpm; disable it
dralley Aug 25, 2018
fe04253
Fix package metadata
dralley Sep 16, 2018
2f71436
Utilize GNUInstallDirs
dralley Sep 16, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
from skbuild import setup

version = '{major}.{minor}.{patch}'

with open('VERSION.cmake', 'r+') as version_file:
version_text = version_file.read()
# split on lines, remove empty lines
lines = filter(len, version_text.split('\n'))
# parse out digit characters from the line, convert to int
numbers = [int("".join(filter(str.isdigit, line))) for line in lines]
Copy link
Contributor Author

@dralley dralley Aug 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could potentially be done "better" with regex, but I'm pretty weak with regex, and I think it's valid to assume there won't be numeric characters on each line that aren't part of the actual version number.

But I'm open to suggestions on how to do this better.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it would be a pure python package, I would suggest to use python-versioneer

But in the case of createrepo_c, the project can be built either as a standalone project or python package, the version management needs to be available to both.

For now, I suggest to stick with your approach. Later after we standardize approaches like the one done here, this could be revisited.

# build version string
version = version.format(major=numbers[0], minor=numbers[1], patch=numbers[2])

setup(
name='createrepo_c',
description='C implementation of createrepo',
version='0.10.0',
version=version,
license='GPLv2',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is GPLv2+

author='RPM Software Management',
author_email='',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Email address is [email protected]

Expand Down